[Gossip-dev] transports bug

Michele Campeotto micampe at micampe.it
Mon Oct 16 19:19:16 CEST 2006


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);
 	}


  but this doesn't look like the correct solution at all, so I'm
leaving a proper fix to somebody more acquainted with gossip's code.

  I haven't tried if the bug is still present in CVS.


  mic

-- 
Michele Campeotto - http://micampe.it

It's psychosomatic. You need a lobotomy. I'll get a saw.
	-- Calvin


More information about the Gossip-dev mailing list