[asterisk-dev] [Code Review] 2423: Pimp my SIP: Messaging

Joshua Colp reviewboard at asterisk.org
Tue Apr 16 17:31:33 CDT 2013


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



/team/group/pimp_my_sip/channels/chan_gulp.c
<https://reviewboard.asterisk.org/r/2423/#comment15954>

    You know the length of the text - why don't you just allocate a structure large enough to hold the text as well and make text a zero sized array?



/team/group/pimp_my_sip/channels/chan_gulp.c
<https://reviewboard.asterisk.org/r/2423/#comment15953>

    Just return early and reduce indentation.



/team/group/pimp_my_sip/channels/chan_gulp.c
<https://reviewboard.asterisk.org/r/2423/#comment15952>

    There's actually a memory leak if it the task can't be pushed.



/team/group/pimp_my_sip/res/res_sip_messaging.c
<https://reviewboard.asterisk.org/r/2423/#comment15955>

    Why not use the pjsip URI parser for this?



/team/group/pimp_my_sip/res/res_sip_messaging.c
<https://reviewboard.asterisk.org/r/2423/#comment15956>

    Everything else in Gulp land uses endpoint for this variable, may as well use it as well.



/team/group/pimp_my_sip/res/res_sip_messaging.c
<https://reviewboard.asterisk.org/r/2423/#comment15957>

    Use ast_strlen_zero just in case.



/team/group/pimp_my_sip/res/res_sip_messaging.c
<https://reviewboard.asterisk.org/r/2423/#comment15958>

    I realize you probably got this format from chan_sip but I'm actually not happy with it. I think it should follow the same convention as Dial - but of course if someone else feels differently so be it.



/team/group/pimp_my_sip/res/res_sip_messaging.c
<https://reviewboard.asterisk.org/r/2423/#comment15959>

    You don't have to parse this. I suggest taking a look at res_sip_callerid as it also modifies the From header.



/team/group/pimp_my_sip/res/res_sip_messaging.c
<https://reviewboard.asterisk.org/r/2423/#comment15960>

    Return early.



/team/group/pimp_my_sip/res/res_sip_messaging.c
<https://reviewboard.asterisk.org/r/2423/#comment15962>

    On error conditions there's a memory leak of tdata here.



/team/group/pimp_my_sip/res/res_sip_messaging.c
<https://reviewboard.asterisk.org/r/2423/#comment15961>

    Use ast_strlen_zero



/team/group/pimp_my_sip/res/res_sip_messaging.c
<https://reviewboard.asterisk.org/r/2423/#comment15963>

    Ditto here - memory leak on failure.


- Joshua Colp


On April 11, 2013, 10:40 p.m., Kevin Harwell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2423/
> -----------------------------------------------------------
> 
> (Updated April 11, 2013, 10:40 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-21076
>     https://issues.asterisk.org/jira/browse/ASTERISK-21076
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Adds messaging support to the new SIP work being done in Asterisk.  Both out of call and in-dialog MESSAGE requests are handled.
> 
> 
> Diffs
> -----
> 
>   /team/group/pimp_my_sip/channels/chan_gulp.c 385389 
>   /team/group/pimp_my_sip/res/res_sip.c 385389 
>   /team/group/pimp_my_sip/res/res_sip_messaging.c PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/2423/diff/
> 
> 
> Testing
> -------
> 
> Wrote/modified several tests for the testsuite that include tests for both out of call and in-dialog MESSAGE requests, custom header propagation, MessageSend with specified from parameter, and the AMI MessageSend action.
> 
> 
> Thanks,
> 
> Kevin Harwell
> 
>

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


More information about the asterisk-dev mailing list