pidgin: e9fdd89a: jabber: Strip the '/' off of a JID in ja..
Mark Doliner
mark at kingant.net
Wed Aug 26 20:54:44 EDT 2009
On Wed, Aug 26, 2009 at 5:42 PM, Paul Aurich<paul at darkrain42.org> wrote:
> And Mark Doliner spoke on 08/22/2009 04:51 PM, saying:
>> 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.
>>
>> -Mark
>
>
> How does the attached patch look? I'm not sure if other prpls use (and
> expect) the last separator to be appended even when the last field is
> empty, so . This version should be less memory-happy.
That looks ok to me. If a JID ends in a slash shouldn't it be
considered invalid and jabber_normalize() should return NULL? I guess
it might not matter within the jabber prpl.
-Mark
More information about the Devel
mailing list