diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2005-07-13 16:44:55 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2005-07-13 16:44:55 +0000 |
commit | 1432749293f6dbc0b0bb32ec1e83605bcac95d2a (patch) | |
tree | db1d86c65067434e9afe38671b5bbc808a4b05a0 /apps/app_queue.c | |
parent | 91f84f9098745939beffe971864f5dc7906383c9 (diff) |
add QueueStatusComplete event (bug #4694 with minor mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_queue.c')
-rwxr-xr-x | apps/app_queue.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index c0dea9426..8ea0e8647 100755 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -3249,6 +3249,7 @@ static int manager_queues_status( struct mansession *s, struct message *m ) if (!ast_strlen_zero(id)) { snprintf(idText,256,"ActionID: %s\r\n",id); } + ast_mutex_lock(&s->lock); for (q = queues; q; q = q->next) { ast_mutex_lock(&q->lock); @@ -3256,7 +3257,6 @@ static int manager_queues_status( struct mansession *s, struct message *m ) if (ast_strlen_zero(queuefilter) || !strcmp(q->name, queuefilter)) { if(q->callscompleted > 0) sl = 100*((float)q->callscompletedinsl/(float)q->callscompleted); - ast_mutex_lock(&s->lock); ast_cli(s->fd, "Event: QueueParams\r\n" "Queue: %s\r\n" "Max: %d\r\n" @@ -3307,10 +3307,17 @@ static int manager_queues_status( struct mansession *s, struct message *m ) (long)(now - qe->start), idText); } } - ast_mutex_unlock(&s->lock); ast_mutex_unlock(&q->lock); } ast_mutex_unlock(&qlock); + + ast_cli(s->fd, + "Event: QueueStatusComplete\r\n" + "%s" + "\r\n",idText); + + ast_mutex_unlock(&s->lock); + return RESULT_SUCCESS; } |