# HG changeset patch # User Paul Aurich # Date 1285135514 0 # Node ID 4f6273c899b9f85b4a7cdb3fb51f8b432c7e02d9 # Parent 22a71353220092ac987884c9f5d0966d46ec8647 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! diff -r 22a713532200 -r 4f6273c899b9 libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Tue Sep 21 14:08:35 2010 +0000 +++ b/libpurple/protocols/jabber/jabber.c Wed Sep 22 06:05:14 2010 +0000 @@ -2641,13 +2641,19 @@ 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");