]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Prevent phantom calls to queue members.
authorMark Michelson <mmichelson@digium.com>
Wed, 8 Jul 2009 19:26:13 +0000 (19:26 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 8 Jul 2009 19:26:13 +0000 (19:26 +0000)
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@205349 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 6cbba3103fd65596c3b2cca62901cee44e93f695..28958969c591978ced46a4863f87499b417b9a55 100644 (file)
@@ -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 */