aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-16 15:28:22 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-16 15:28:22 +0000
commit3703e314eb603926e389b01bcfb731034a6c0504 (patch)
treed6274f7857479c52c80618a84add2fdf72d7168c
parentc484716b873bbb78ce52cf3625c103f0e05aecbe (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@89323 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_queue.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 875afdaa4..2efa077aa 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 */