[asterisk-dev] [Code Review] 3903: Stasis: Allow internal channels directly into bridges

Matt Jordan reviewboard at asterisk.org
Mon Aug 11 12:48:37 CDT 2014


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



branches/12/res/res_stasis.c
<https://reviewboard.asterisk.org/r/3903/#comment23512>

    How do you know that this channel has an unreal_pvt? What if it isn't an unreal channel?
    
    Currently, that would cause this to crash - or at least behave very oddly.



branches/12/res/res_stasis.c
<https://reviewboard.asterisk.org/r/3903/#comment23511>

    This scoped lock seems like overkill. You aren't going to actually manipulate the datastore; you merely want to know if it exists at this moment in time.
    
    Nested functions have a cost. If we don't need them, let's not use them.



branches/12/res/res_stasis.c
<https://reviewboard.asterisk.org/r/3903/#comment23510>

    I've never really enjoyed this convention. It isn't highly used in Asterisk.
    
    Why not just return (datastore != NULL)? Better yet, set a local variable to that result and return it.


- Matt Jordan


On Aug. 11, 2014, 12:40 p.m., opticron wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3903/
> -----------------------------------------------------------
> 
> (Updated Aug. 11, 2014, 12:40 p.m.)
> 
> 
> Review request for Asterisk Developers, Matt Jordan and Mark Michelson.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> The patch to catch channels being shoehorned into Stasis() via external mechanisms also happens to catch Announcer and Recorder channels because they aren't known to be stasis-controlled channels in the usual sense. This marks those channels as Stasis()-internal channels and allows them directly into bridges.
> 
> 
> Diffs
> -----
> 
>   branches/12/res/stasis/stasis_bridge.c 420591 
>   branches/12/res/res_stasis.c 420591 
>   branches/12/res/ari/resource_bridges.c 420591 
>   branches/12/include/asterisk/stasis_app.h 420591 
> 
> Diff: https://reviewboard.asterisk.org/r/3903/diff/
> 
> 
> Testing
> -------
> 
> Ensured this patch fixed rest_api/bridges/playback/tones and rest_api/bridges/bridge_record tests.
> 
> 
> Thanks,
> 
> opticron
> 
>

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


More information about the asterisk-dev mailing list