[asterisk-dev] [Code Review]: Regression: Fix behavior of queue set penalty so that it properly handles 'queue set penalty <penalty> on <interface>' instead of crashing caused by r325483

jrose reviewboard at asterisk.org
Thu Dec 8 14:10:00 CST 2011



> On Dec. 8, 2011, 11:50 a.m., Matt Jordan wrote:
> > /branches/10/apps/app_queue.c, line 5501
> > <https://reviewboard.asterisk.org/r/1609/diff/2/?file=22166#file22166line5501>
> >
> >     What if the queue isn't in realtime?  In that case, I would expect you would be able to just pull the queue out of the queues container and call set_member_penalty_help_members

load_realtime_queue() first tries to find the queue from the 'in-core list' (queues).  If that queue isn't marked as realtime, it immediately returns the queue in it's current status without any further overhead, so this already accomplishes that.


> On Dec. 8, 2011, 11:50 a.m., Matt Jordan wrote:
> > /branches/10/apps/app_queue.c, line 5465
> > <https://reviewboard.asterisk.org/r/1609/diff/2/?file=22166#file22166line5465>
> >
> >     Mark with \internal

Next patch will include doc changes.


- jrose


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1609/#review4962
-----------------------------------------------------------


On Dec. 8, 2011, 10:56 a.m., jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1609/
> -----------------------------------------------------------
> 
> (Updated Dec. 8, 2011, 10:56 a.m.)
> 
> 
> Review request for Asterisk Developers and irroot.
> 
> 
> Summary
> -------
> 
> r325483 caused Asterisk to lose the ability to set penalty on an interface without specifying the queue, and worse than that also introduces a segfault from trying to.  The segfault only occurs when penalty is set using the queue set penalty command in CLI and not when using QueuePenalty from the manager, however the manager action wouldn't work without specifying a queue either, it just wouldn't crash Asterisk.
> 
> This patch attempts to fix that by changing irroot's realtime patch so that the new method for picking the queue being acted on is only employed if the method used prior to that can't find a queue to work on.  If no queuename is specified, this is fine since the crash would only occur if there was a queue attached to the interface anyway.  This doesn't seem to cause any problems in normal queues, but I haven't tested it with realtime queues.
> 
> 
> Diffs
> -----
> 
>   /branches/10/apps/app_queue.c 346971 
> 
> Diff: https://reviewboard.asterisk.org/r/1609/diff
> 
> 
> Testing
> -------
> 
> Various uses of queue set penalty and QueuePenalty from manager.  Also, I'm currently working on an automated test for this within the Asterisk testsuite.
> 
> 
> Thanks,
> 
> jrose
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111208/094a18f3/attachment-0001.htm>


More information about the asterisk-dev mailing list