RE: [reSIProcate] NameAddr::parse() bug?
No I don't see this, using SVN head. Can you post code that shows this?
However I do see something that I'm not 100% sure is correct:
The following NameAddr will produce a trailing space in the display
name:
DisplayName <sip:user@xxxxxxxx>
In this case display name is "DisplayName " - is that correct? Or
should it be "DisplayName"?
Scott
> -----Original Message-----
> From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-
> devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Francesco Fondelli
> Sent: Monday, November 07, 2005 10:16 AM
> To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [reSIProcate] NameAddr::parse() bug?
>
> Hi all,
>
> sish->peerAddr().displayName().c_str() returns a string with a leading
> whitespace not present in sip msg (if display name is not
doublequoted).
> Do you confirm it?
>
> e.g.:
>
> From: 0015556678 <sip:foo@xxxxxxxxxxxxx>;tag=as548e6f07
>
> NameAddr::parse(ParseBuffer& pb)
> {
> [snip]
> if (!pb.eof() && *pb.position() == Symbols::STAR[0])
> {
> [snip]
> }
> else
> {
> if (!pb.eof() && *pb.position() == Symbols::DOUBLE_QUOTE[0])
> {
> [snip]
> if (pb.eof())
> {
> throw ParseException("Expected '<'", __FILE__, __LINE__);
> }
> else
> {
> pb.skipChar(Symbols::LA_QUOTE[0]);
> }
> }
> else if (!pb.eof() && *pb.position() == Symbols::LA_QUOTE[0])
> {
> [snip]
> }
> else
//<---------------------------------------------------------
> not doublequoted display name case
> {
> start = pb.position(); //start points at
first
> '0' of 0015556678 <sip:...
> pb.skipToChar(Symbols::LA_QUOTE[0]); //now pb::mPosition
> points to '<'?
> if (pb.eof())
> {
> pb.reset(start);
> }
> else
> {
> laQuote = true;
> pb.data(mDisplayName, start); //pb::data() makes a
> shared area starting from '0' ending at ' ' (mPosition - 1)
> pb.skipChar(Symbols::LA_QUOTE[0]);
> }
> }
> pb.skipWhitespace();
> mUri.parse(pb);
> [snip...]
> -----------------------
>
>
> Thank you very much
> Regards
> FF
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel