[svn-commits] mmichelson: branch 1.4 r81520 - /branches/1.4/apps/app_queue.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Sep 5 10:03:22 CDT 2007


Author: mmichelson
Date: Wed Sep  5 10:03:22 2007
New Revision: 81520

URL: http://svn.digium.com/view/asterisk?view=rev&rev=81520
Log:
Reverting behavior of QUEUE_MEMBER_COUNT to only count members who are logged in
and available.

(related to issue #10652, reported by wuwu)


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=81520&r1=81519&r2=81520
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Wed Sep  5 10:03:22 2007
@@ -3653,7 +3653,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 svn-commits mailing list