[asterisk-dev] [Code Review] Fix crash during CDR update.

Matt Jordan reviewboard at asterisk.org
Fri Dec 16 13:25:43 CST 2011


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

Ship it!


unlock(Ship it!)

- Matt


On Dec. 16, 2011, 11:28 a.m., rmudgett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1628/
> -----------------------------------------------------------
> 
> (Updated Dec. 16, 2011, 11:28 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This patch simply adds lock protection around CDR API calls that access an ast_channel pointer.
> 
> The ast_cdr_setcid() and ast_cdr_update() were shown in ASTERISK-18836 to be called by different threads for the same channel.  The channel driver thread and the PBX thread running dialplan.
> 
> 
> This addresses bug ASTERISK-18836.
>     https://issues.asterisk.org/jira/browse/ASTERISK-18836
> 
> 
> Diffs
> -----
> 
>   http://svn.asterisk.org/svn/asterisk/branches/1.8/apps/app_authenticate.c 348310 
>   http://svn.asterisk.org/svn/asterisk/branches/1.8/apps/app_followme.c 348310 
>   http://svn.asterisk.org/svn/asterisk/branches/1.8/apps/app_queue.c 348310 
>   http://svn.asterisk.org/svn/asterisk/branches/1.8/funcs/func_cdr.c 348310 
>   http://svn.asterisk.org/svn/asterisk/branches/1.8/include/asterisk/cdr.h 348310 
>   http://svn.asterisk.org/svn/asterisk/branches/1.8/main/channel.c 348310 
>   http://svn.asterisk.org/svn/asterisk/branches/1.8/main/features.c 348310 
>   http://svn.asterisk.org/svn/asterisk/branches/1.8/main/pbx.c 348310 
>   http://svn.asterisk.org/svn/asterisk/branches/1.8/res/res_monitor.c 348310 
> 
> Diff: https://reviewboard.asterisk.org/r/1628/diff
> 
> 
> Testing
> -------
> 
> It compiles and I can see the potential for reentrancy from other threads.
> 
> 
> Thanks,
> 
> rmudgett
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111216/63003650/attachment.htm>


More information about the asterisk-dev mailing list