[asterisk-dev] [Code Review] SIP: refactoring parsing functions and the addition of new unit tests

Olle E. Johansson oej at edvina.net
Wed Feb 3 14:33:02 CST 2010


3 feb 2010 kl. 21.24 skrev David Vossel:

> 
> 
>> On 2010-02-03 09:17:02, Nick Lewis wrote:
>>> /trunk/channels/sip/reqresp_parser.c, line 30
>>> <https://reviewboard.asterisk.org/r/477/diff/4/?file=7984#file7984line30>
>>> 
>>>    Would it be possible please to return the "headers" and the "residue" after the headers. 
>>> 
>>>    Many message-headers (different meaning) contain parameters after the uri. The parameters are separated from the uri with a ";" but as a uri may contain a ";" it is not possible to strip off the parameters before calling parse_uri (especially if the uri is not in brackets). 
>>> 
>>>    A "residue" would contain these parameters that could be subjected to further processing
> 
> This patch is only for refactoring of these functions, not for changing their behavior (although I did have to make slight changes because of bugs I found during testing).  I agree and came to the same conclusion you did when I began looking into this function further.  I'd recommend creating a issue in the bug tracker for this so it will remain documented.
> 

It's important to separate
- header parameters
- uri parameters
- username-part-parameters

These are all different parameters and some of them play a role in comparisions of URI's.

/O


More information about the asterisk-dev mailing list