[asterisk-commits] mmichelson: branch 1.6.2 r193350 - in /branches/1.6.2: ./ apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 8 14:51:26 CDT 2009


Author: mmichelson
Date: Fri May  8 14:51:22 2009
New Revision: 193350

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=193350
Log:
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
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/apps/app_queue.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/apps/app_queue.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/apps/app_queue.c?view=diff&rev=193350&r1=193349&r2=193350
==============================================================================
--- branches/1.6.2/apps/app_queue.c (original)
+++ branches/1.6.2/apps/app_queue.c Fri May  8 14:51:22 2009
@@ -1222,6 +1222,16 @@
 	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);
+		}
+	}
 }
 
 /*! 




More information about the asterisk-commits mailing list