From 8d927fad0d2cba3aff19ab87b33f26cc0ad23726 Mon Sep 17 00:00:00 2001 From: Ivan Poddubny Date: Tue, 5 May 2015 19:48:36 +0000 Subject: [PATCH] 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 --- apps/app_queue.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/app_queue.c b/apps/app_queue.c index 8744286631..c670f20786 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -7204,7 +7204,8 @@ check_turns: 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; } @@ -7233,7 +7234,8 @@ check_turns: /* 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; -- 2.47.2