[Home]

Summary:ASTERISK-14096: [patch] Add Queue Reset ability to Reset all members and all Numbers
Reporter:Sebastian Gutierrez (sum)Labels:
Date Opened:2009-05-08 09:13:40Date Closed:2009-05-08 14:51:23
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) patchreset.patch
Description:When you reset a queue there are few things are not reset and are important to get the numbers consistent.
talktime and the statics of the members of the queue.
Comments:By: Mark Michelson (mmichelson) 2009-05-08 14:39:34

Hi sum, thanks for the patch.

Your patch accomplishes what needs to be done, but there are a few tweaks that need to be made.

1. The coding guidelines state that lines should be indented with tabs, not spaces.

2. The coding guidelines recommend that you use curly braces to enclose the body of while/for/if/do blocks even if the body is only one line.

3. You need to be sure to decrement the reference count of mem every time through the while loop.

4. Trailing whitespace is discouraged.

Since this is all very minor, and I know you've been trying to get this functionality in for a while, I can make the necessary adjustments when committing the change. Thanks for the patch!

By: Sebastian Gutierrez (sum) 2009-05-08 14:46:44

thank you, maybe some spaces are because of my editor (I'm pretty sure I use tabs not spaces), do you recomend some editor or IDE to get better results?
I will re read the coding guidelines so my future patches follow your standards, (I uploaded some minor patches these days so those may have the same issue).
I'ts time to start earning some karma :) and help improving asterisk!

Thanks again



By: Mark Michelson (mmichelson) 2009-05-08 14:49:12

Most editors have a method of specifying what the "tab" button actually does. Choosing which editor to use is a matter of personal preference. I have now run a test compilation of your patch and all seems well. I will be committing the fix shortly.

By: Digium Subversion (svnbot) 2009-05-08 14:50:45

Repository: asterisk
Revision: 193349

U   trunk/apps/app_queue.c

------------------------------------------------------------------------
r193349 | mmichelson | 2009-05-08 14:50:45 -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 ASTERISK-14096)
Reported by: sum
Patches:
     patchreset.patch uploaded by sum (license 766)
Tested by: sum


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=193349

By: Digium Subversion (svnbot) 2009-05-08 14:51:23

Repository: asterisk
Revision: 193350

_U  branches/1.6.2/
U   branches/1.6.2/apps/app_queue.c

------------------------------------------------------------------------
r193350 | mmichelson | 2009-05-08 14:51:22 -0500 (Fri, 08 May 2009) | 18 lines

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 ASTERISK-14096)
 Reported by: sum
 Patches:
       patchreset.patch uploaded by sum (license 766)
 Tested by: sum
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=193350