[Asterisk-code-review] app queue: set QUEUESTATUS to LEAVEEMPTY instead of CONTINUE (asterisk[15])

Joshua Colp asteriskteam at digium.com
Tue Aug 14 05:00:37 CDT 2018


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/9855 )

Change subject: app_queue: set QUEUESTATUS to LEAVEEMPTY instead of CONTINUE
......................................................................

app_queue: set QUEUESTATUS to LEAVEEMPTY instead of CONTINUE

When a call leaves a queue on leaveempty condition, QUEUESTATUS
must be set to LEAVEEMPTY, no matter whether Queue was executed with or
without the "c" (continue) option.

The regression was introduced in the fix for ASTERISK_25665.
The following fix (ASTERISK_27065) was incomplete, as QUEUESTATUS was
overwritten in case when "c" is set, regardless of what was the cause
for leaving the queue.

ASTERISK-27973 #close
Reported-by: Valentin Safonov

Change-Id: Iec013fe6a26a4e825ca572a1dda4f3cee5f6f80c
---
M apps/app_queue.c
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Jaco Kroon: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit



diff --git a/apps/app_queue.c b/apps/app_queue.c
index c2962db..bae49f4 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -8359,12 +8359,12 @@
 					"%d|%d|%ld", qe.pos, qe.opos,
 					(long) (time(NULL) - qe.start));
 				res = -1;
-			} 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 (qcontinue) {
+				reason = QUEUE_CONTINUE;
+				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/9855
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Iec013fe6a26a4e825ca572a1dda4f3cee5f6f80c
Gerrit-Change-Number: 9855
Gerrit-PatchSet: 2
Gerrit-Owner: Ivan Poddubny <ivan.poddubny at gmail.com>
Gerrit-Reviewer: Jaco Kroon <jaco at uls.co.za>
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-code-review/attachments/20180814/9cae8592/attachment.html>


More information about the asterisk-code-review mailing list