[asterisk-dev] [Code Review] 3104: PJSIP CLI Part 2

Joshua Colp reviewboard at asterisk.org
Thu Jan 16 09:10:44 CST 2014


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


Not yet done reviewing but I know others will look at this soon, so posting what I've got.


branches/12/include/asterisk/res_pjsip.h
<https://reviewboard.asterisk.org/r/3104/#comment20059>

    Document the destruction functions just like the initialization ones are documented.



branches/12/res/res_pjsip/config_auth.c
<https://reviewboard.asterisk.org/r/3104/#comment20067>

    You don't need to store the sorcery instance, you can use ast_sip_get_sorcery to retrieve it. Same goes for the other places you've used this approach.



branches/12/res/res_pjsip/config_transport.c
<https://reviewboard.asterisk.org/r/3104/#comment20068>

    Just curious why the change... easier to read?



branches/12/res/res_pjsip_endpoint_identifier_ip.c
<https://reviewboard.asterisk.org/r/3104/#comment20062>

    Coding guidelines. { goes on next line.



branches/12/res/res_pjsip_endpoint_identifier_ip.c
<https://reviewboard.asterisk.org/r/3104/#comment20061>

    Using RAII_VAR here doesn't really have any benefit.



branches/12/res/res_pjsip_endpoint_identifier_ip.c
<https://reviewboard.asterisk.org/r/3104/#comment20060>

    There's a memory leak right here. You can probably get away with:
    
    struct ast_variable fields = {
        .name = "endpoint",
        .value = ast_sorcery_object_get_id(endpoint),
    };



branches/12/res/res_pjsip_endpoint_identifier_ip.c
<https://reviewboard.asterisk.org/r/3104/#comment20063>

    Coding guidelines. { goes on next line.



branches/12/res/res_pjsip_endpoint_identifier_ip.c
<https://reviewboard.asterisk.org/r/3104/#comment20064>

    I'm cracking down on gratuitous RAII_VAR usage these days.



branches/12/res/res_pjsip_endpoint_identifier_ip.c
<https://reviewboard.asterisk.org/r/3104/#comment20065>

    Ditto on RAII_VAR use, plus this allocation can fail.



branches/12/res/res_pjsip_outbound_registration.c
<https://reviewboard.asterisk.org/r/3104/#comment20066>

    This can fail.


- Joshua Colp


On Jan. 6, 2014, 9:49 p.m., George Joseph wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3104/
> -----------------------------------------------------------
> 
> (Updated Jan. 6, 2014, 9:49 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Adds identify, transport and registration support to the CLI.
> Creates 3 additional callbacks, one for an iterator, one for a comparator and one for a container.  This eliminates the link dependency from higher level modules to lower level ones.
> Eliminates duplicate sorting.
> Cleans up output formatting.
> Pushes cli registration down to the implementing source file.
> Adds several ast_sip_destroy_sorcery functions to complement existing ast_sip_sorcery_initialize functions.  The destroy functions unregister cli commands and cli formatters.
> 
> 
> Diffs
> -----
> 
>   branches/12/res/res_pjsip_outbound_registration.c 405000 
>   branches/12/res/res_pjsip_endpoint_identifier_ip.c 405000 
>   branches/12/res/res_pjsip/pjsip_configuration.c 405000 
>   branches/12/res/res_pjsip/pjsip_cli.c 405000 
>   branches/12/res/res_pjsip/location.c 405000 
>   branches/12/res/res_pjsip/config_transport.c 405000 
>   branches/12/res/res_pjsip/config_auth.c 405000 
>   branches/12/include/asterisk/res_pjsip_cli.h 405000 
>   branches/12/include/asterisk/res_pjsip.h 405000 
> 
> Diff: https://reviewboard.asterisk.org/r/3104/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> George Joseph
> 
>

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


More information about the asterisk-dev mailing list