[Gossip-dev] transports bug

Martyn Russell martyn at imendio.com
Mon Oct 16 19:32:21 CEST 2006


Michele Campeotto wrote:
> Hello,
>  I think there is a bug with transports in Gossip 0.17. I registered
> a transport with another client and verified that it is working there,
> then I switched to Gossip and noticed it doesn't anymore.
> 
>  I tried running it with LM_DEBUG=NET and I found this:
> 
> SEND:
> -----------------------------------
> <message type="chat" to="micampe2 at aim.nedbsd.nl/" id="198707199205">
> <body>1</body>
>  <x xmlns="jabber:x:event">  <composing></composing>
> </x>
> </message>
> 
> -----------------------------------
> 
> RECV [389]:
> -----------------------------------
> '<message type="error" to="micampe at gmail.com/Work" id="198707199205"
> from="micampe2 at aim.nedbsd.nl/">  <body>1</body>
>  <x xmlns="jabber:x:event">  <composing/>
> </x>
> <error code="400" type="modify"><jid-malformed
> xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text
> xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Malformed JID
> 'micampe2 at aim.nedbsd.nl/': resource is empty</text></error></message>'
> -----------------------------------
> 
> 
> and this seems to make it work:
> 
> --- gossip-0.17.orig/protocols/jabber/gossip-jabber.c
> +++ gossip-0.17/protocols/jabber/gossip-jabber.c
> @@ -1424,12 +1424,14 @@
>         g_object_unref (recipient);
>     }
> 
> -    if (resource) {
> +    if (resource && strlen(resource) > 0) {
>         jid_str = g_strdup_printf ("%s/%s", recipient_id, resource);
>     } else {
>         jid_str = g_strdup (recipient_id);
>     }

It looks right to me :)

I have committed it:
http://bugzilla.gnome.org/show_bug.cgi?id=362661

Thanks for spotting this.

-- 
Regards,
Martyn


More information about the Gossip-dev mailing list