[asterisk-dev] [Code Review] Fix chan_sip websocket handling.

jcolp reviewboard at asterisk.org
Thu Nov 29 09:59:32 CST 2012


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

Ship it!


- jcolp


On Nov. 28, 2012, 11:03 a.m., Pedro Kiefer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2219/
> -----------------------------------------------------------
> 
> (Updated Nov. 28, 2012, 11:03 a.m.)
> 
> 
> Review request for Asterisk Developers and Joshua Colp.
> 
> 
> Summary
> -------
> 
> Websocket by default doesn't return an ast_str for the payload received. When converting it to an ast_str on chan_sip the last character was being omitted, because ast_str functions expects that the given length includes the trailing 0x00. payload_len only has the actual string length without counting the trailing zero. For most cases this passed unnoticed as most of SIP messages ends with \r\n.
> 
> 
> This addresses bug ASTERISK-20745.
>     https://issues.asterisk.org/jira/browse/ASTERISK-20745
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_sip.c 376616 
> 
> Diff: https://reviewboard.asterisk.org/r/2219/diff
> 
> 
> Testing
> -------
> 
> Tested, everything works as supposed. 
> 
> 
> Thanks,
> 
> Pedro
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20121129/5ac5d9b8/attachment.htm>


More information about the asterisk-dev mailing list