From: BJ Weschke Date: Mon, 8 May 2006 13:11:32 +0000 (+0000) Subject: Don't recheck valid_exit() after getting the result from say_position (which already... X-Git-Tag: 1.2.8~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41210a37d6bdf72b0ea0c9799c9f26f4e6d54a57;p=thirdparty%2Fasterisk.git Don't recheck valid_exit() after getting the result from say_position (which already checks it). Should prevent another loop if the caller hits digits during the position announcement. #6776 (tgj reporting) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25518 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index 763febfa19..bd6102136e 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -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; }