[asterisk-dev] [Code Review] 4057: bridge: Every time a bridge lies during the smart bridge operation I cry

rmudgett reviewboard at asterisk.org
Thu Oct 9 13:08:17 CDT 2014


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



/branches/12/main/bridge.c
<https://reviewboard.asterisk.org/r/4057/#comment24000>

    The num_active value is a count of the number of channels that are not suspended from the bridge.  This does include the channels that haven't completed joining the bridge yet.  If you want to have a correct count of active channels on the dummy_bridge, in the move loop you need to:
    if (!bridge_channel->suspended) {
    	++dummy_bridge.num_active;
    }
    
    You would need to do something similar for num_lonely if you think that also should be correct on the dummy_bridge.



/branches/12/main/bridge.c
<https://reviewboard.asterisk.org/r/4057/#comment24001>

    Similar here



/branches/12/main/bridge.c
<https://reviewboard.asterisk.org/r/4057/#comment24002>

    This is now the comment for the loop:
    
    Add any new channels or re-add existing channels to the bridge.


- rmudgett


On Oct. 8, 2014, 11:41 a.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4057/
> -----------------------------------------------------------
> 
> (Updated Oct. 8, 2014, 11:41 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Right now when a smart bridge operation occurs the bridge provided to the old technology is full of lies. This has the result of making technology implementations more complex because they can't assume the bridge is truthful, resulting in them storing more state than is needed or having additional code paths.
> 
> The attached change makes the bridge provided to the old technology truthful. The bridge will contain all the channels that are actually in the old bridge instead of none. As a result the bridge_native_rtp module can be made a bit dumber and slimmed down. This makes the smart bridge operation, to the old technology, a series of normal leave calls.
> 
> 
> Diffs
> -----
> 
>   /branches/12/main/bridge.c 424413 
>   /branches/12/bridges/bridge_native_rtp.c 424413 
> 
> Diff: https://reviewboard.asterisk.org/r/4057/diff/
> 
> 
> Testing
> -------
> 
> Performed calls and ran tests.
> 
> 
> Thanks,
> 
> Joshua Colp
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141009/8009285b/attachment-0001.html>


More information about the asterisk-dev mailing list