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:
Mark Michelson
2007-11-16 15:28:22 +00:00
parent 92d1018c2a
commit 891b3bab2a

View File

@@ -3757,17 +3757,9 @@ static int queue_function_qac(struct ast_channel *chan, char *cmd, char *data, c
}
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);
while ((m = ao2_iterator_next(&mem_iter))) {
/* Count the agents who are logged in and presently answering calls */