]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 205350 via svnmerge from
authorMark Michelson <mmichelson@digium.com>
Wed, 8 Jul 2009 19:27:49 +0000 (19:27 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 8 Jul 2009 19:27:49 +0000 (19:27 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r205350 | mmichelson | 2009-07-08 14:26:55 -0500 (Wed, 08 Jul 2009) | 20 lines

  Merged revisions 205349 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r205349 | mmichelson | 2009-07-08 14:26:13 -0500 (Wed, 08 Jul 2009) | 14 lines

    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: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@205352 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 024aad08ec2da36bfcff83dd6025b707482bf8dd..71aa9e2d1856a0677d3fe34075e099702009f7eb 100644 (file)
@@ -1960,7 +1960,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 */
@@ -2507,7 +2508,7 @@ static int say_periodic_announcement(struct queue_ent *qe, int ringing)
        /* play the announcement */
        res = play_file(qe->chan, qe->parent->sound_periodicannounce[qe->last_periodic_announce_sound]->str);
 
-       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 */