From 891b3bab2ac4dc7b62269ca89eb1a305bcd89fc2 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Fri, 16 Nov 2007 15:28:22 +0000 Subject: [PATCH] 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 --- apps/app_queue.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/apps/app_queue.c b/apps/app_queue.c index 875afdaa45..2efa077aa1 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -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 */