[asterisk-commits] app queue: Fix returning to dialplan when a queue is empty (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jun 30 15:52:38 CDT 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5911 )
Change subject: app_queue: Fix returning to dialplan when a queue is empty
......................................................................
app_queue: Fix returning to dialplan when a queue is empty
The fix for ASTERISK-25665 introduced a regression.
The return value of queue_exec used to be 0 in case of leavewhenempty
but it was changed to -1 (returned from wait_our_turn and passed
transparently by queue_exec), thus leading to hangup instead of returning
back to dialplan.
This commit resets the value back to 0 in this case, restoring
original behavior.
ASTERISK-27065 #close
Reported by: Marek Cervenka
Change-Id: Id9c83b75aeda463250155e88c5004be52bbca5ac
---
M apps/app_queue.c
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Richard Mudgett: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/apps/app_queue.c b/apps/app_queue.c
index f158a4c..b306af1 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -8301,6 +8301,9 @@
} else if (qcontinue) {
reason = QUEUE_CONTINUE;
res = 0;
+ } else if (reason == QUEUE_LEAVEEMPTY) {
+ /* Return back to dialplan, don't hang up */
+ res = 0;
}
} else if (qe.valid_digits) {
ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITWITHKEY",
--
To view, visit https://gerrit.asterisk.org/5911
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id9c83b75aeda463250155e88c5004be52bbca5ac
Gerrit-Change-Number: 5911
Gerrit-PatchSet: 2
Gerrit-Owner: Ivan Poddubny <ivan.poddubny at gmail.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170630/0dd16f23/attachment.html>
More information about the asterisk-commits
mailing list