[Asterisk-code-review] app queue: Fix returning to dialplan when a queue is empty (asterisk[13])
Ivan Poddubny
asteriskteam at digium.com
Thu Jun 29 09:51:51 CDT 2017
Ivan Poddubny has uploaded this change for review. ( https://gerrit.asterisk.org/5926
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/26/5926/1
diff --git a/apps/app_queue.c b/apps/app_queue.c
index b449263..ac4738f 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -8166,6 +8166,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/5926
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9c83b75aeda463250155e88c5004be52bbca5ac
Gerrit-Change-Number: 5926
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/20170629/6c8a7dc3/attachment-0001.html>
More information about the asterisk-code-review
mailing list