[asterisk-dev] [Code Review] 2965: stasis: Ensure channels are departed from bridges

rmudgett reviewboard at asterisk.org
Wed Oct 30 11:24:43 CDT 2013


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



/branches/12/res/stasis/control.c
<https://reviewboard.asterisk.org/r/2965/#comment19264>

    Hmm.  Is there a defined locking order between a stasis control lock and a channel lock?


- rmudgett


On Oct. 30, 2013, 1:57 p.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2965/
> -----------------------------------------------------------
> 
> (Updated Oct. 30, 2013, 1:57 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-22703
>     https://issues.asterisk.org/jira/browse/ASTERISK-22703
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Currently within Stasis there is no guarantee that a channel that leaves a bridge will have ast_bridge_depart called on it. The attached change changes this by having a command queued on the channel that explicitly departs it when it leaves a bridge. This works for outside manipulation, bridge deletion, hangup, etc.
> 
> This fixes an issue that the referenced bug exposed. When hanging up while in a bridge no synchronization occurred between the bridge and stasis - causing both to act on a channel at the same time. Depending on how fast the stasis side executed it was possible for the channel itself to be freed and the bridge reference this freed memory.
> 
> 
> Diffs
> -----
> 
>   /branches/12/res/stasis/control.c 402263 
> 
> Diff: https://reviewboard.asterisk.org/r/2965/diff/
> 
> 
> Testing
> -------
> 
> Deleted a bridge with a channel in it, confirmed with the patch that departure occurs and the bridge is destroyed.
> 
> Hungup while in a bridge, confirmed with the patch that departure occurs.
> 
> 
> Thanks,
> 
> Joshua Colp
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131030/793da4ec/attachment.html>


More information about the asterisk-dev mailing list