transports bug

"Michele Campeotto" <[email protected]> Mon, 16 Oct 2006 19:19:16 +0200
Newsgroups gmane.comp.gnome.gossip.devel
Message-ID <[email protected]>
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="[email protected]/" id="198707199205">
<body>1</body>
  <x xmlns="jabber:x:event">  <composing></composing>
</x>
</message>

-----------------------------------

RECV [389]:
-----------------------------------
'<message type="error" to="[email protected]/Work" id="198707199205"
from="[email protected]/">  <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
'[email protected]/': 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