pidgin: e9fdd89a: jabber: Strip the '/' off of a JID in ja..

Elliott Sales de Andrade qulogic at
Sat Aug 22 20:34:38 EDT 2009

On Sat, Aug 22, 2009 at 8:11 PM, Elliott Sales de Andrade <qulogic at
> wrote:

> On Sat, Aug 22, 2009 at 7:51 PM, Mark Doliner <mark at> wrote:
>> Hmm, is this change ONLY needed to handle the case where our JID ends
>> in a slash?  I wonder if there is another way we could fix this...
>> like maybe not appending the slash?  Or appending a default resource?
>> Or changing jabber_id_new() to ignore a trailing slash?  I'm afraid
>> that Jabber's normalize function gets called often and the extra
>> strlen and strdup could be expensive.
> I can't say what's required here, but I can simplify it a bit:
> if (in[len - 1] == '/')
>     in[len - 1] = '\0';
> It won't remove the strlen, but it gets rid of the strdup and free.

Oops, khc pointed out that's a little silly since `in` is a `const char *`.
Sooo, never mind me then.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Devel mailing list