[Devel] lumps

Marco Holmer holmer at comdasys.com
Thu Sep 7 11:13:51 CEST 2006

Hi developers,

I was trying to find about rewriting (or inserting if necessary) of the 
Contact header's URI parameter "transport". As I could not find anything 
about it I implemented a function myself, but I am having trouble with 
the data lump system.
The function works fine so far, but if some changed the URI beforehand, 
eg. with fix_nated_contact, the URI parsing results in a sip_uri struct 
with its pointer (such as host, port, ...) pointing into the lump so 
inserting a new lump fails as the anchor postiion lies somewhere outside 
the original message.

Is there a general way to cope with this - e.g. traversing all lumps and 
changing the buffers manually, which sort of undermines the whole 
purpose of having parsing functionality?

Only thing I could find is a check on the position of the parsed URI 
pointers in fix_nated_contact, which disallows any additional call to 
the function (the easy way).
But I want to allow the fix_nated_contact function + changing the 
transport param.
Maybe I have overseen something obvious?

Thanks in advance,
Marco Holmer

More information about the Devel mailing list