[asterisk-commits] mmichelson: branch 1.4 r89323 - /branches/1.4/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 16 09:28:23 CST 2007


Author: mmichelson
Date: Fri Nov 16 09:28:22 2007
New Revision: 89323

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89323
Log:
Make realtime queues accessible from the QUEUE_MEMBER_COUNT function.

(closes issue #11271, reported and patched by atis, with small modifications from me)


Modified:
    branches/1.4/apps/app_queue.c

Modified: branches/1.4/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_queue.c?view=diff&rev=89323&r1=89322&r2=89323
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Fri Nov 16 09:28:22 2007
@@ -3757,17 +3757,9 @@
 	}
 
 	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 */




More information about the asterisk-commits mailing list