im.pidgin.pidgin: a9f75de97d6cdf8fe8bf091b95def6c648aac82f

rekkanoryo at cpw.pidgin.im rekkanoryo at cpw.pidgin.im
Fri Nov 2 03:05:37 EDT 2007


-----------------------------------------------------------------
Revision: a9f75de97d6cdf8fe8bf091b95def6c648aac82f
Ancestor: 1205e278220163b2062ec507c8868153e338ef8e
Author: rekkanoryo at cpw.pidgin.im
Date: 2007-11-02T06:59:04
Branch: im.pidgin.pidgin

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

ChangeLog: 

This patch prevents changing the saved account password for XMPP accounts
if the server returns an error.  Fixes #2265.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	218b51943e20baf575458b7ddca8d6429a2cb120
+++ libpurple/protocols/jabber/jabber.c	70ba36fb50e6cb34f3415a21f12a40130f540ff1
@@ -1664,6 +1664,8 @@ jabber_password_change_result_cb(JabberS
 	if(type && !strcmp(type, "result")) {
 		purple_notify_info(js->gc, _("Password Changed"), _("Password Changed"),
 				_("Your password has been changed."));
+
+		purple_account_set_password(js->gc->account, (char *)data);
 	} else {
 		char *msg = jabber_parse_error(js, packet);
 
@@ -1671,6 +1673,8 @@ jabber_password_change_result_cb(JabberS
 				_("Error changing password"), msg);
 		g_free(msg);
 	}
+
+	g_free(data);
 }
 
 static void jabber_password_change_cb(JabberStream *js,
@@ -1699,11 +1703,9 @@ static void jabber_password_change_cb(Ja
 	y = xmlnode_new_child(query, "password");
 	xmlnode_insert_data(y, p1, -1);
 
-	jabber_iq_set_callback(iq, jabber_password_change_result_cb, NULL);
+	jabber_iq_set_callback(iq, jabber_password_change_result_cb, g_strdup(p1));
 
 	jabber_iq_send(iq);
-
-	purple_account_set_password(js->gc->account, p1);
 }
 
 static void jabber_password_change(PurplePluginAction *action)


More information about the Commits mailing list