[asterisk-dev] [Code Review] 2493: Add WebSocket transport module

Matt Jordan reviewboard at asterisk.org
Wed May 8 08:47:00 CDT 2013


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



/team/group/pimp_my_sip/res/res_sip.c
<https://reviewboard.asterisk.org/r/2493/#comment16364>

    That looks a little odd. How about:
    
    if (sip_get_tpselector_from_uri(uri, &selector) && sip_get_tpselector_from_endpoint(endpoint, &selector)) {
      pjsip_dlg_terminate(dlg);
      return NULL;
    }



/team/group/pimp_my_sip/res/res_sip.exports.in
<https://reviewboard.asterisk.org/r/2493/#comment16365>

    Is there any reason not to just export everything that begins with ast_*?



/team/group/pimp_my_sip/res/res_sip_transport_websocket.c
<https://reviewboard.asterisk.org/r/2493/#comment16366>

    Since this is a relatively rare and unique module - a transport extension for pjsip! - I think erring on the side of documentation is warranted.
    
    For the major objects and functions, some \brief tags would be appropriate.



/team/group/pimp_my_sip/res/res_sip_transport_websocket.c
<https://reviewboard.asterisk.org/r/2493/#comment16367>

    The write call can technically fail. Would it be better to return a PJ_* error response if it does?



/team/group/pimp_my_sip/res/res_sip_transport_websocket.c
<https://reviewboard.asterisk.org/r/2493/#comment16368>

    We should be checking for allocation failures of the endpoint, transport manager, pool, and newtransport
    
    There's a number of other allocations that occur in this routine that should be checked as well.



/team/group/pimp_my_sip/res/res_sip_transport_websocket.c
<https://reviewboard.asterisk.org/r/2493/#comment16369>

    Same finding here on checking allocation returns



/team/group/pimp_my_sip/res/res_sip_transport_websocket.c
<https://reviewboard.asterisk.org/r/2493/#comment16370>

    This can fail



/team/group/pimp_my_sip/res/res_sip_transport_websocket.c
<https://reviewboard.asterisk.org/r/2493/#comment16371>

    Restructure this to reduce indentation:
    
    ct = ast_sip_location_...
    
    if (!ct) {
      return;
    }
    
    ...



/team/group/pimp_my_sip/res/res_sip_transport_websocket.c
<https://reviewboard.asterisk.org/r/2493/#comment16372>

    This feels like it deserves a WARNING or an ERROR.


- Matt Jordan


On May 2, 2013, 9:02 p.m., Jason Parker wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2493/
> -----------------------------------------------------------
> 
> (Updated May 2, 2013, 9:02 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-20952
>     https://issues.asterisk.org/jira/browse/ASTERISK-20952
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Adds a custom WebSocket transport module.
> 
> 
> Diffs
> -----
> 
>   /team/group/pimp_my_sip/include/asterisk/res_sip.h 387511 
>   /team/group/pimp_my_sip/res/res_sip.c 387511 
>   /team/group/pimp_my_sip/res/res_sip.exports.in 387511 
>   /team/group/pimp_my_sip/res/res_sip/config_transport.c 387511 
>   /team/group/pimp_my_sip/res/res_sip/location.c 387511 
>   /team/group/pimp_my_sip/res/res_sip_outbound_registration.c 387511 
>   /team/group/pimp_my_sip/res/res_sip_transport_websocket.c PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/2493/diff/
> 
> 
> Testing
> -------
> 
> Registration works, incoming (from the browser) and outgoing (to the browser) calls work, audio flows (though, I don't have a mic, so I didn't test audio that direction).
> 
> 
> Thanks,
> 
> Jason Parker
> 
>

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


More information about the asterisk-dev mailing list