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

Pedro Kiefer reviewboard at asterisk.org
Wed Nov 28 11:03:01 CST 2012


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

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/20121128/dc6f3d97/attachment.htm>


More information about the asterisk-dev mailing list