pidgin: f852e4b1: Allow blank resources on XMPP when creat...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Thu Nov 27 21:50:30 EST 2008


-----------------------------------------------------------------
Revision: f852e4b127e886aca05cce9878f9bb7019a0eaec
Ancestor: 2cc8e4346c2748d5b7e177197f54e0146fca809d
Author: rekkanoryo at pidgin.im
Date: 2008-11-28T02:42:47
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f852e4b127e886aca05cce9878f9bb7019a0eaec

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

ChangeLog: 

Allow blank resources on XMPP when creating/modifying accounts.  This works
perfectly with both ejabberd and Google Talk.  Other servers should be OK too.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	c9c76b05193ce707a8c5b3e2041671dc08b7642a
+++ libpurple/protocols/jabber/jabber.c	2f95ffd441d330e3c9955c901d2782ab4b532cb3
@@ -702,19 +702,6 @@ jabber_login(PurpleAccount *account)
 		return;
 	}
 	
-	if(!js->user->resource) {
-		char *me;
-		js->user->resource = g_strdup("Home");
-		if(!js->user->node) {
-			js->user->node = js->user->domain;
-			js->user->domain = g_strdup("jabber.org");
-		}
-		me = g_strdup_printf("%s@%s/%s", js->user->node, js->user->domain,
-				js->user->resource);
-		purple_account_set_username(account, me);
-		g_free(me);
-	}
-
 	if((my_jb = jabber_buddy_find(js, purple_account_get_username(account), TRUE)))
 		my_jb->subscription |= JABBER_SUB_BOTH;
 
@@ -1182,19 +1169,6 @@ void jabber_register_account(PurpleAccou
 
 	js->write_buffer = purple_circ_buffer_new(512);
 
-	if(!js->user->resource) {
-		char *me;
-		js->user->resource = g_strdup("Home");
-		if(!js->user->node) {
-			js->user->node = js->user->domain;
-			js->user->domain = g_strdup("jabber.org");
-		}
-		me = g_strdup_printf("%s@%s/%s", js->user->node, js->user->domain,
-				js->user->resource);
-		purple_account_set_username(account, me);
-		g_free(me);
-	}
-
 	if((my_jb = jabber_buddy_find(js, purple_account_get_username(account), TRUE)))
 		my_jb->subscription |= JABBER_SUB_BOTH;
 
============================================================
--- libpurple/protocols/jabber/libxmpp.c	31613decdb030de3b53c0cc7925068de5f40deb2
+++ libpurple/protocols/jabber/libxmpp.c	6f56ad50467f427b20c7a81ccab51c0f6f6f50d4
@@ -209,7 +209,7 @@ init_plugin(PurplePlugin *plugin)
 	purple_account_user_split_set_reverse(split, FALSE);
 	prpl_info.user_splits = g_list_append(prpl_info.user_splits, split);
 	
-	split = purple_account_user_split_new(_("Resource"), "Home", '/');
+	split = purple_account_user_split_new(_("Resource"), NULL, '/');
 	purple_account_user_split_set_reverse(split, FALSE);
 	prpl_info.user_splits = g_list_append(prpl_info.user_splits, split);
 	


More information about the Commits mailing list