aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-09-05 15:03:22 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-09-05 15:03:22 +0000
commit8efa099472b4d60a899c7c86549ecc1861e88bce (patch)
treeac9f5c64c08e28d8aaa1eca74d8e5331d831a2e5 /apps
parent193d8403024a4a08107c4fbe13e73a5851d1d1d5 (diff)
Reverting behavior of QUEUE_MEMBER_COUNT to only count members who are logged in
and available. (related to issue #10652, reported by wuwu) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81520 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index cdfc97240..1dcc40740 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3653,7 +3653,12 @@ static int queue_function_qac(struct ast_channel *chan, char *cmd, char *data, c
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);