]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't recheck valid_exit() after getting the result from say_position (which already...
authorBJ Weschke <bweschke@btwtech.com>
Mon, 8 May 2006 13:11:32 +0000 (13:11 +0000)
committerBJ Weschke <bweschke@btwtech.com>
Mon, 8 May 2006 13:11:32 +0000 (13:11 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25518 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 763febfa1916a5f209f2367a82f26a6726bca683..bd6102136e85c4bbf9ca87e3c32f83e09e78ab9e 100644 (file)
@@ -1184,7 +1184,9 @@ static int say_position(struct queue_ent *qe)
        /* Set our last_pos indicators */
        qe->last_pos = now;
        qe->last_pos_said = qe->pos;
-       ast_moh_start(qe->chan, qe->moh);
+       /* Don't restart music on hold if we're about to exit the caller from the queue */
+       if (!res)
+               ast_moh_start(qe->chan, qe->moh);
 
        return res;
 }
@@ -2989,7 +2991,7 @@ check_turns:
                                        /* Make a position announcement, if enabled */
                                        if (qe.parent->announcefrequency && !ringing)
                                                res = say_position(&qe);
-                                       if (res && valid_exit(&qe, res)) {
+                                       if (res) {
                                                ast_queue_log(queuename, chan->uniqueid, "NONE", "EXITWITHKEY", "%s|%d", qe.digits, qe.pos);
                                                break;
                                        }