pidgin: 4b199542: some server(s) don't like empty resource...

khc at pidgin.im khc at pidgin.im
Thu Dec 18 01:31:19 EST 2008


-----------------------------------------------------------------
Revision: 4b199542a64ade94d38f23bd0907fdb7d35c2269
Ancestor: 571d5bf2fff9e937663ef53a174ae141999d6de2
Author: khc at pidgin.im
Date: 2008-12-18T06:28:36
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/4b199542a64ade94d38f23bd0907fdb7d35c2269

Modified files:
        libpurple/protocols/jabber/jabber.c

ChangeLog: 

some server(s) don't like empty resource which we now default to. I am not
entirely sure if this is the right place to do this though.


-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	f5ad5d51792123756e76a2cb23a1e60daa14d8e0
+++ libpurple/protocols/jabber/jabber.c	c125aa12f0dbbdf9844fb419d5e9572e235ca373
@@ -1413,6 +1413,15 @@ void jabber_stream_set_state(JabberStrea
 			if(js->protocol_version == JABBER_PROTO_0_9 && js->registration) {
 				jabber_register_start(js);
 			} else if(js->auth_type == JABBER_AUTH_IQ_AUTH) {
+				/* with dreamhost's xmpp server at least, you have to
+				   specify a resource or you will get a "406: Not
+				   Acceptable"
+				*/
+				if(!js->user->resource || *js->user->resource == '\0') {
+					g_free(js->user->resource);
+					js->user->resource = g_strdup("Home");
+				}
+
 				jabber_auth_start_old(js);
 			}
 			break;


More information about the Commits mailing list