[asterisk-commits] app queue: Fix queue log EXITWITHTIMEOUT containing only 1 p... (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 6 07:42:05 CDT 2015


Joshua Colp has submitted this change and it was merged.

Change subject: app_queue: Fix queue_log EXITWITHTIMEOUT containing only 1 parameter
......................................................................


app_queue: Fix queue_log EXITWITHTIMEOUT containing only 1 parameter

This patch fixes EXITWITHTIMEOUT queue_log entry to always come with 3
parameters: position, original position and waiting time.

ASTERISK-25038 #close
Reported by: Etienne Lessard

Change-Id: I0c62045922e26bee2125e93aee1dee17eee79618
---
M apps/app_queue.c
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Matt Jordan: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Verified



diff --git a/apps/app_queue.c b/apps/app_queue.c
index df5ff30..c0018b5 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -7817,7 +7817,8 @@
 			record_abandoned(&qe);
 			reason = QUEUE_TIMEOUT;
 			res = 0;
-			ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITWITHTIMEOUT", "%d", qe.pos);
+			ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITWITHTIMEOUT",
+				"%d|%d|%ld", qe.pos, qe.opos, (long) (time(NULL) - qe.start));
 			break;
 		}
 
@@ -7846,7 +7847,8 @@
 		/* exit after 'timeout' cycle if 'n' option enabled */
 		if (noption && tries >= ao2_container_count(qe.parent->members)) {
 			ast_verb(3, "Exiting on time-out cycle\n");
-			ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITWITHTIMEOUT", "%d", qe.pos);
+			ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITWITHTIMEOUT",
+				"%d|%d|%ld", qe.pos, qe.opos, (long) (time(NULL) - qe.start));
 			record_abandoned(&qe);
 			reason = QUEUE_TIMEOUT;
 			res = 0;

-- 
To view, visit https://gerrit.asterisk.org/369
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c62045922e26bee2125e93aee1dee17eee79618
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Ivan Poddubny <ivan.poddubny at gmail.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list