pidgin: 555d9bcd: jabber: Catch resource conflict IQ stanz...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Wed Sep 22 02:11:34 EDT 2010


----------------------------------------------------------------------
Revision: 555d9bcde1406a62d833d18595a863f65b388719
Parent:   1c95349dea8172a09f164340b6346523d95d6770
Author:   darkrain42 at pidgin.im
Date:     09/22/10 02:05:14
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/555d9bcde1406a62d833d18595a863f65b388719

Changelog: 

jabber: Catch resource conflict IQ stanza errors returned by server

Discussion on IETF XMPP WG mailing list pointed out this is a possible
outcome, and needs to be handled better in clients.  So, here's handling
it better in clients!

Changes against parent 1c95349dea8172a09f164340b6346523d95d6770

  patched  libpurple/protocols/jabber/jabber.c

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	f4de9f9146812cca9194ceff2eeb1fa53ff63c8a
+++ libpurple/protocols/jabber/jabber.c	ceae25989c6ecdde4a8f86f97d97ac4628e45013
@@ -2641,13 +2641,19 @@ char *jabber_parse_error(JabberStream *j
 	if(reason != NULL) { *reason = x; }
 
 	if((error = xmlnode_get_child(packet, "error"))) {
+		xmlnode *t = xmlnode_get_child_with_namespace(error, "text", NS_XMPP_STANZAS);
+		if (t)
+			cdata = xmlnode_get_data(t);
+#if 0
 		cdata = xmlnode_get_data(error);
+#endif
 		code = xmlnode_get_attrib(error, "code");
 
 		/* Stanza errors */
 		if(xmlnode_get_child(error, "bad-request")) {
 			text = _("Bad Request");
 		} else if(xmlnode_get_child(error, "conflict")) {
+			SET_REASON(PURPLE_CONNECTION_ERROR_NAME_IN_USE);
 			text = _("Conflict");
 		} else if(xmlnode_get_child(error, "feature-not-implemented")) {
 			text = _("Feature Not Implemented");


More information about the Commits mailing list