libpurple/protocols/jabber/usernick.c

branch
cpw.malu.ft_thumbnails
changeset 29846
290ea3dee4c2
parent 29782
ca4fedd9e890
child 31294
73607ab89c6f
--- a/libpurple/protocols/jabber/usernick.c	Sun Feb 28 22:56:50 2010 +0000
+++ b/libpurple/protocols/jabber/usernick.c	Tue Mar 09 21:41:55 2010 +0000
@@ -86,14 +86,12 @@
 }
 
 static void do_nick_set_nick(PurplePluginAction *action) {
-	PurpleConnection *gc = (PurpleConnection *) action->context;
-	JabberStream *js = gc->proto_data;
-	char *jid = g_strdup_printf("%s@%s", js->user->node, js->user->domain);
+	PurpleConnection *gc = action->context;
+	JabberStream *js = purple_connection_get_protocol_data(gc);
 
 	/* since the nickname might have been changed by another resource of this account, we always have to request the old one
 		from the server to present as the default for the new one */
-	jabber_pep_request_item(js, jid, "http://jabber.org/protocol/nick", NULL, do_nick_got_own_nick_cb);
-	g_free(jid);
+	jabber_pep_request_item(js, NULL, "http://jabber.org/protocol/nick", NULL, do_nick_got_own_nick_cb);
 }
 
 void jabber_nick_init(void) {

mercurial