[asterisk-dev] [Code Review] Parsing of reg->username containing @domain
David Vossel
dvossel at digium.com
Tue May 25 13:58:13 CDT 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/628/#review2082
-----------------------------------------------------------
I fixed all the stuff I commented about here in the patch on my machine, it was all simple changes. Unless you have any comments about the changes I listed below, I'm going to sanity test this some more and get it committed.
trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/628/#comment4384>
if (default_fromdomain && (default_fromdomainport != STANDARD_SIP_PORT)) since default_fromdomainport may not be set.
trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/628/#comment4385>
if no port was provided, set peer->fromdomainport = STANDARD_SIP_PORT;
trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/628/#comment4382>
default_fromdomainport should only be set to a valid port when default_fromdomain is set. Otherwise you have default_fromdomainport being copied around with no default_fromdomain.
trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/628/#comment4383>
This is where default_fromdomainport should be set. If no port was specified, set it to the default sip port.
- David
On 2010-05-21 06:03:31, Nick Lewis wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/628/
> -----------------------------------------------------------
>
> (Updated 2010-05-21 06:03:31)
>
>
> Review request for Asterisk Developers and David Vossel.
>
>
> Summary
> -------
>
> reg->username is parsed for each registration refresh rather than once on sip reload. A previously committed change that addressed this was reverted because it did not cater for registration strings that contained a peer name in the host field. This change does.
>
>
> This addresses bug 14331.
> https://issues.asterisk.org/view.php?id=14331
>
>
> Diffs
> -----
>
> trunk/channels/chan_sip.c 258227
> trunk/channels/sip/config_parser.c 258227
> trunk/channels/sip/include/sip.h 258228
> trunk/main/app.c 258227
>
> Diff: https://reviewboard.asterisk.org/r/628/diff
>
>
> Testing
> -------
>
> Passes a new unit test for parsing usernames containing domains. Passes existing unit tests. Passes peername functional test with sip.conf snippet
>
> [general]
> register=nick at quirk
> [quirk]
> fromdomain=10.10.235.48
>
>
> Thanks,
>
> Nick
>
>
More information about the asterisk-dev
mailing list