mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Properly lock management stuff (bug #2406)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2047,6 +2047,7 @@ static int manager_queues_status( struct mansession *s, struct message *m )
|
||||
/* List queue properties */
|
||||
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"
|
||||
@@ -2088,6 +2089,7 @@ static int manager_queues_status( struct mansession *s, struct message *m )
|
||||
"%s"
|
||||
"\r\n",
|
||||
q->name, pos++, qe->chan->name, (qe->chan->callerid ? qe->chan->callerid : ""), (long)(now - qe->start), idText);
|
||||
ast_mutex_unlock(&s->lock);
|
||||
ast_mutex_unlock(&q->lock);
|
||||
}
|
||||
ast_mutex_unlock(&qlock);
|
||||
|
Reference in New Issue
Block a user