[Asterisk-code-review] app queue: Fix returning to dialplan when a queue is empty (asterisk[master])

Ivan Poddubny asteriskteam at digium.com
Tue Jun 27 04:51:14 CDT 2017


Ivan Poddubny has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/11/5911/1

diff --git a/apps/app_queue.c b/apps/app_queue.c
index f158a4c..179fa65 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) {
+				// should continue dialplan execution
+				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: newchange
Gerrit-Change-Id: Id9c83b75aeda463250155e88c5004be52bbca5ac
Gerrit-Change-Number: 5911
Gerrit-PatchSet: 1
Gerrit-Owner: Ivan Poddubny <ivan.poddubny at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170627/afb9f723/attachment.html>


More information about the asterisk-code-review mailing list