diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-07-08 19:26:13 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-07-08 19:26:13 +0000 |
commit | e329880829b84c59da1b1939124d60d8688ea90d (patch) | |
tree | 2ee4afb06dbf2b3dc71ee3278a29c115f7e639ed | |
parent | 8920e7a61347b52b2555369958cefa3b40ebacca (diff) |
Prevent phantom calls to queue members.
If a caller were to hang up while a periodic announcement or position
were being said, the return value for those functions would incorrectly
indicate that the caller was still in the queue. With these changes,
the problem does not occur.
(closes issue #14631)
Reported by: latinsud
Patches:
queue_announce_ghost_call2.diff uploaded by latinsud (license 745)
(with small modification from me)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@205349 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_queue.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 6cbba3103..28958969c 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1648,7 +1648,8 @@ posout: res = play_file(qe->chan, qe->parent->sound_thanks); playout: - if ((res > 0 && !valid_exit(qe, res)) || res < 0) + + if ((res > 0 && !valid_exit(qe, res))) res = 0; /* Set our last_pos indicators */ @@ -2123,7 +2124,7 @@ static int say_periodic_announcement(struct queue_ent *qe) /* play the announcement */ res = play_file(qe->chan, qe->parent->sound_periodicannounce[qe->last_periodic_announce_sound]); - if ((res > 0 && !valid_exit(qe, res)) || res < 0) + if (res > 0 && !valid_exit(qe, res)) res = 0; /* Resume Music on Hold if the caller is going to stay in the queue */ |