Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv28132/apps

Modified Files:
        app_queue.c 
Log Message:
add QueueStatusComplete event (bug #4694 with minor mods)


Index: app_queue.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -d -r1.149 -r1.150
--- app_queue.c 12 Jul 2005 22:28:51 -0000      1.149
+++ app_queue.c 13 Jul 2005 16:44:55 -0000      1.150
@@ -3249,6 +3249,7 @@
        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 @@
                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 @@
                                                (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;
 }
 

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to