[OpenSIPS-Devel] [ opensips-Bugs-2757377 ] parse_sip_msg_uri not working as expected.

SourceForge.net noreply at sourceforge.net
Mon Apr 13 10:06:52 CEST 2009


Bugs item #2757377, was opened at 2009-04-13 05:02
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2757377&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: trunk
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Sergio Gutierrez (saguti)
>Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: parse_sip_msg_uri not working as expected.

Initial Comment:
parse_sip_msg_uri is intended to initialize parsed_uri field of sip_msg struct.

When using this function, I see that parsed_uri.user.s, when is displayed, shows the whole sip message.

----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2009-04-13 11:06

Message:
Hi Sergio,

parsed_uri.user is a STR struct and the these kind of strings are not null
terminated (they are kept as start + len). When printing, %s is for a
null-terminated string (and it will not work for a str struct); for STR
use, "%.*s" and pass len and start as parameters.

Regards,
Bogdan


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2757377&group_id=232389



More information about the Devel mailing list