mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Make realtime queues accessible from the QUEUE_MEMBER_COUNT function.
(closes issue #11271, reported and patched by atis, with small modifications from me) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3757,17 +3757,9 @@ static int queue_function_qac(struct ast_channel *chan, char *cmd, char *data, c
|
|||||||
}
|
}
|
||||||
|
|
||||||
lu = ast_module_user_add(chan);
|
lu = ast_module_user_add(chan);
|
||||||
|
|
||||||
AST_LIST_LOCK(&queues);
|
|
||||||
AST_LIST_TRAVERSE(&queues, q, list) {
|
|
||||||
if (!strcasecmp(q->name, data)) {
|
|
||||||
ast_mutex_lock(&q->lock);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
AST_LIST_UNLOCK(&queues);
|
|
||||||
|
|
||||||
if (q) {
|
if((q = load_realtime_queue(data))) {
|
||||||
|
ast_mutex_lock(&q->lock);
|
||||||
mem_iter = ao2_iterator_init(q->members, 0);
|
mem_iter = ao2_iterator_init(q->members, 0);
|
||||||
while ((m = ao2_iterator_next(&mem_iter))) {
|
while ((m = ao2_iterator_next(&mem_iter))) {
|
||||||
/* Count the agents who are logged in and presently answering calls */
|
/* Count the agents who are logged in and presently answering calls */
|
||||||
|
Reference in New Issue
Block a user