diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-08 19:51:22 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-08 19:51:22 +0000 |
commit | 2bde53b1f24ed29ef0b7b4fa206ab195323d633f (patch) | |
tree | e81886d5ae96b075275ab678c8727ace9417aa01 | |
parent | eea59fb3940f1fd1403f6b4a496727e872d3ded8 (diff) |
Merged revisions 193349 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r193349 | mmichelson | 2009-05-08 14:50:44 -0500 (Fri, 08 May 2009) | 12 lines
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: http://svn.digium.com/svn/asterisk/branches/1.6.2@193350 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_queue.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 886cda6db..3150cb90e 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1222,6 +1222,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); + } + } } /*! |