[asterisk-dev] [Code Review] Parse mwi => lines in sip.conf properly to avoid segfaults and have it work.

Russell Bryant reviewboard at asterisk.org
Thu Dec 16 12:52:43 UTC 2010


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

Ship it!


Nice work!  Thanks for adding a unit test!

My comments are all very minor, so feel free to commit after making these tweaks.  My only other comment, which is just an idea for a potential future enhancement to the test, would be to add some bogus input strings that you expect to fail to make sure that they are handled gracefully.


/branches/1.8/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/1053/#comment6245>

    Instead of "int", "enum ast_test_result_state"



/branches/1.8/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/1053/#comment6246>

    Align case indentation with switch



/branches/1.8/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/1053/#comment6247>

    Use ast_test_status_update()



/branches/1.8/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/1053/#comment6248>

    It looks like this can be just if (!found)


- Russell


On 2010-12-15 17:17:49, Marquis wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1053/
> -----------------------------------------------------------
> 
> (Updated 2010-12-15 17:17:49)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Modify the parsing of mwi subscription lines in sip.conf in order to avoid an existing segfault and to have it properly populate the struct for subscriptions.
> 
> 
> This addresses bug 18350.
>     https://issues.asterisk.org/view.php?id=18350
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/channels/chan_sip.c 298391 
>   /branches/1.8/configs/sip.conf.sample 298391 
> 
> Diff: https://reviewboard.asterisk.org/r/1053/diff
> 
> 
> Testing
> -------
> 
> Added lines for various possible permutations (kept in the diff for documentation) as well as temporary (not in the diff) debug lines to verify all strings were set to their expected values.  Reporter in issue 18350 also applied patch and verified that his segfault was gone and that subscriptions were working.
> 
> 
> Thanks,
> 
> Marquis
> 
>

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


More information about the asterisk-dev mailing list