summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2009-05-08 19:50:44 +0000
committerMark Michelson <mmichelson@digium.com>2009-05-08 19:50:44 +0000
commit7a2a6a073f9796f622204abe60b64c5ac8372ea1 (patch)
treee2a249926786ea9020d486b99ab2dd5b73970096 /apps
parent0595e95a713461ec8b68fe34788464ec4a0409a9 (diff)
Reset the members' call counts when resetting queue statistics.
This helps to prevent odd scenarios where a queue will claim to have taken 0 calls, but the members appear to have taken a non-zero amount. (closes issue #15068) Reported by: sum Patches: patchreset.patch uploaded by sum (license 766) Tested by: sum git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index eee4e5569..6590f6bad 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1234,6 +1234,16 @@ static void clear_queue(struct call_queue *q)
q->callsabandoned = 0;
q->callscompletedinsl = 0;
q->wrapuptime = 0;
+ q->talktime = 0;
+
+ if (q->members) {
+ struct member *mem;
+ struct ao2_iterator mem_iter = ao2_iterator_init(q->members, 0);
+ while ((mem = ao2_iterator_next(&mem_iter))) {
+ mem->calls = 0;
+ ao2_ref(mem, -1);
+ }
+ }
}
/*!