[asterisk-dev] [Code Review] get_pai function doesnt work correct, using reqresp_parser functions solves this problem
Mark Michelson
reviewboard at asterisk.org
Tue Jan 17 08:36:55 CST 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1673/#review5192
-----------------------------------------------------------
Ship it!
Great work! It seems like there's a theme lately in chan_sip: using the parsing functions provided by reqresp_parser.h is a lot better than trying to do it manually.
team/schmidts/unleash-the-beast/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/1673/#comment9682>
There's a red blob here.
team/schmidts/unleash-the-beast/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/1673/#comment9683>
You can change this to
return !dont_update;
Personally, I would rather you change the "dont_update" variable to an "update" variable. This way, at the end, you don't end up with a double negative like you have here ("not don't update").
- Mark
On Jan. 17, 2012, 8:11 a.m., schmidts wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1673/
> -----------------------------------------------------------
>
> (Updated Jan. 17, 2012, 8:11 a.m.)
>
>
> Review request for Asterisk Developers and wdoekes.
>
>
> Summary
> -------
>
> the get_pai function in chan_sip.c fails to parse a PAI header with a display name set but without ". There are also some wrong char pointer initialisations used.
> By replacing the self made header parsing functions by reqresp_parser functions everything works fine.
>
>
> Diffs
> -----
>
> team/schmidts/unleash-the-beast/channels/chan_sip.c 350974
>
> Diff: https://reviewboard.asterisk.org/r/1673/diff
>
>
> Testing
> -------
>
> tested several different P-Asserted-Identity Headers with display name or without.
>
>
> Thanks,
>
> schmidts
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120117/bcab7bcf/attachment-0001.htm>
More information about the asterisk-dev
mailing list