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

Matt Jordan reviewboard at asterisk.org
Fri May 2 08:28:14 CDT 2014


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



/branches/11/apps/app_queue.c
<https://reviewboard.asterisk.org/r/3508/#comment21659>

    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);



/branches/11/apps/app_queue.c
<https://reviewboard.asterisk.org/r/3508/#comment21660>

    Lock the queue member here as well.


- Matt Jordan


On April 30, 2014, 9:40 a.m., sysreq wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3508/
> -----------------------------------------------------------
> 
> (Updated April 30, 2014, 9:40 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/159e4bb2/attachment-0001.html>


More information about the asterisk-dev mailing list