summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2007-09-05 15:04:50 +0000
committerMark Michelson <mmichelson@digium.com>2007-09-05 15:04:50 +0000
commit3d62457e96bf4883650dfbe3df6b3aa5dd48dda5 (patch)
tree4c37869f9df7ca3f1bd46b665bcdb413d15c8e49 /apps
parentdcb85e24569e6b462e6aa0975a78792dee18aa1e (diff)
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) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 5e469aa32..d276ea630 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3839,7 +3839,12 @@ static int queue_function_qac(struct ast_channel *chan, const char *cmd, char *d
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);