[asterisk-dev] [Code Review] res_musiconhold misuse of refs

rmudgett reviewboard at asterisk.org
Wed Aug 31 19:38:05 CDT 2011


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



branches/1.8/res/res_musiconhold.c
<https://reviewboard.asterisk.org/r/1384/#comment8236>

    This is going to cause MOH to forget where it was the last time MOH ran.  Also I think you should to keep the module reference for the life of the channel in case MOH is restarted.
    
    The main problem is the moh_alloc() and moh_release() functions are not handling the state->class reference consistently.
    
    I should have a patch tomorrow.


- rmudgett


On Aug. 25, 2011, 4:13 p.m., kobaz wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1384/
> -----------------------------------------------------------
> 
> (Updated Aug. 25, 2011, 4:13 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> When starting MusicOnHold from Dial() there are some unref problems which lead to corruptions and crashing.  See ASTERISK-18346 for more.
> 
> This patch makes it so that there isn't an extra unref.  Usually local_ast_moh_cleanup() is called on hangup, but the music is already stopped and cleaned up.  This change prevents local_ast_moh_cleanup() from re-cleaning.
> 
> 
> This addresses bug ASTERISK-18346.
>     https://issues.asterisk.org/jira/browse/ASTERISK-18346
> 
> 
> Diffs
> -----
> 
>   branches/1.8/res/res_musiconhold.c 333332 
> 
> Diff: https://reviewboard.asterisk.org/r/1384/diff
> 
> 
> Testing
> -------
> 
> Dial(SIP/2604)
> Pickup
> Hold
> Unhold
> Hangup
> 
> 
> Dial(SIP/2604)
> Pickup
> Hold
> Hangup
> 
> 
> Dial(SIP/2604,,m(ring))
> Pickup
> Hangup
> 
> 
> Dial(SIP/2604,,m(ring))
> Pickup
> Hold
> Unhold
> Hangup
> 
> 
> Dial(SIP/2604,,m(ring))
> Pickup
> Hold
> Hangup
> 
> 
> Thanks,
> 
> kobaz
> 
>

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


More information about the asterisk-dev mailing list