[asterisk-dev] [Code Review] Add ability to set Max-Forwards header from dialplan, general and device configuration

Matthew Nicholson mnicholson at digium.com
Wed Aug 11 12:15:55 CDT 2010


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


I reopened this review as I found a deadlock caused by this code.


/trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/778/#comment5605>

    Deadlock avoidance is needed here.  It is possible for add_header_max_forwards() to be called with the pvt locked but not the channel; pbx_builtin_getvar_helper() then attempts to lock the channel lock, which may already be held by something else waiting for the pvt lock (ast_indicate, ast_hangup, etc).  This causes a deadlock. I have seen this in the blind-transfer-accountcode test on my test box.


- Matthew


On 2010-07-13 11:29:08, Olle E Johansson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/778/
> -----------------------------------------------------------
> 
> (Updated 2010-07-13 11:29:08)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This change adds the ability to set the value of the Max-Forwards header from the Asterisk dialplan and from sip.conf - the general section and per device. 
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_sip.c 275912 
>   /trunk/channels/sip/include/sip.h 275912 
>   /trunk/configs/sip.conf.sample 275912 
>   /trunk/doc/tex/channelvariables.tex 275912 
> 
> Diff: https://reviewboard.asterisk.org/r/778/diff
> 
> 
> Testing
> -------
> 
> The 1.4 version has been in use with the dialplan support for a few weeks. The device config is new.
> 
> 
> Thanks,
> 
> Olle E
> 
>




More information about the asterisk-dev mailing list