[asterisk-commits] mmichelson: trunk r81522 - in /trunk: ./ apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 5 10:04:51 CDT 2007


Author: mmichelson
Date: Wed Sep  5 10:04:50 2007
New Revision: 81522

URL: http://svn.digium.com/view/asterisk?view=rev&rev=81522
Log:
Merged revisions 81520 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81520 | mmichelson | 2007-09-05 10:03:22 -0500 (Wed, 05 Sep 2007) | 6 lines

Reverting behavior of QUEUE_MEMBER_COUNT to only count members who are logged in
and available.

(related to issue #10652, reported by wuwu)


........

Modified:
    trunk/   (props changed)
    trunk/apps/app_queue.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?view=diff&rev=81522&r1=81521&r2=81522
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Wed Sep  5 10:04:50 2007
@@ -3839,7 +3839,12 @@
 	AST_LIST_UNLOCK(&queues);
 
 	if (q) {
-		count = q->membercount;
+		for (m = q->members; m; m = m->next) {
+			/* Count the agents who are logged in and presently answering calls */
+			if ((m->status != AST_DEVICE_UNAVAILABLE) && (m->status != AST_DEVICE_INVALID)) {
+				count++;
+			}
+		}
 		ast_mutex_unlock(&q->lock);
 	} else
 		ast_log(LOG_WARNING, "queue %s was not found\n", data);




More information about the asterisk-commits mailing list