[asterisk-dev] [Code Review] 3508: Prevent a queue member's state from getting stuck when using dynamic hints as 'state_interface'

sysreq reviewboard at asterisk.org
Fri May 2 09:55:52 CDT 2014



> On May 2, 2014, 9:28 a.m., Matt Jordan wrote:
> > /branches/11/apps/app_queue.c, lines 2467-2476
> > <https://reviewboard.asterisk.org/r/3508/diff/1/?file=58142#file58142line2467>
> >
> >     Since you're technically changing the state of the member during this portion (and we just placed the member into the queue->members container), you should lock the queue member:
> >     
> >     ao2_lock(mem);
> >     if (!ast_strlen_zero(mem->state_exten)) {
> >      ...
> >     
> >     }
> >     ao2_unlock(mem);

Ah, right! Thanks.


> On May 2, 2014, 9:28 a.m., Matt Jordan wrote:
> > /branches/11/apps/app_queue.c, lines 2485-2492
> > <https://reviewboard.asterisk.org/r/3508/diff/1/?file=58142#file58142line2485>
> >
> >     Lock the queue member here as well.

Done and done.


- sysreq


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


On May 2, 2014, 10:52 a.m., sysreq wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3508/
> -----------------------------------------------------------
> 
> (Updated May 2, 2014, 10:52 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-18411
>     https://issues.asterisk.org/jira/browse/ASTERISK-18411
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> The rationale behind this patch is that when a hint is used as a 'state_interface', app_queue should explicitly subscribe to it and become a watcher. That will prevent a dynamic hint from disappearing after a 'dialplan reload' because Asterisk thinks it's not being "watched" by anything. We should also unsubscribe from the hint when the agent is removed from the queue.
> 
> 
> Diffs
> -----
> 
>   /branches/11/apps/app_queue.c 413115 
> 
> Diff: https://reviewboard.asterisk.org/r/3508/diff/
> 
> 
> Testing
> -------
> 
> I have tested this patch by using either a dynamic hint, a static hint, a local channel or a SIP device as a queue member's 'state_interface'. I have also added/removed the queue member both through Realtime and the CLI.
> 
> I've had this patch on about half a dozen 1.8/11 production systems (all averaging a thousand users each) for a little more than a month with no apparent issue.
> 
> 
> Thanks,
> 
> sysreq
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140502/cc82494e/attachment-0001.html>


More information about the asterisk-dev mailing list