aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-27 22:43:11 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-27 22:43:11 +0000
commitb6a1245537ee7e53d6f94c51272078f0a61a2f0f (patch)
tree0ec524c71028ebce9a1b640eb11d6b9ef42a50af
parent8097c9f8b7ea40580a299df3958315a43dd1cfab (diff)
Fix issue where queue log events might be missing. (issue #7765 reported by mtryfoss)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@72327 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_queue.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 74cee9c42..730c1153f 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2052,6 +2052,7 @@ static int wait_our_turn(struct queue_ent *qe, int ringing, enum queue_result *r
/* leave the queue if no agents, if enabled */
if (qe->parent->leavewhenempty && (stat == QUEUE_NO_MEMBERS)) {
*reason = QUEUE_LEAVEEMPTY;
+ ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long)(time(NULL) - qe->start));
leave_queue(qe);
break;
}
@@ -2059,6 +2060,7 @@ static int wait_our_turn(struct queue_ent *qe, int ringing, enum queue_result *r
/* leave the queue if no reachable agents, if enabled */
if ((qe->parent->leavewhenempty == QUEUE_EMPTY_STRICT) && (stat == QUEUE_NO_REACHABLE_MEMBERS)) {
*reason = QUEUE_LEAVEUNAVAIL;
+ ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long)(time(NULL) - qe->start));
leave_queue(qe);
break;
}
@@ -3172,6 +3174,7 @@ check_turns:
if (qe.parent->leavewhenempty && (stat == QUEUE_NO_MEMBERS)) {
record_abandoned(&qe);
reason = QUEUE_LEAVEEMPTY;
+ ast_queue_log(queuename, chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe.pos, qe.opos, (long)(time(NULL) - qe.start));
res = 0;
break;
}
@@ -3180,6 +3183,7 @@ check_turns:
if ((qe.parent->leavewhenempty == QUEUE_EMPTY_STRICT) && (stat == QUEUE_NO_REACHABLE_MEMBERS)) {
record_abandoned(&qe);
reason = QUEUE_LEAVEUNAVAIL;
+ ast_queue_log(queuename, chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe.pos, qe.opos, (long)(time(NULL) - qe.start));
res = 0;
break;
}