besser82 / rpms / pidgin

Forked from rpms/pidgin 6 years ago
Clone
Blob Blame History Raw
http://developer.pidgin.im/viewmtn/revision/info/bcd6dbfb605e7969c586fa89f022a3877b9a8c48
Temporarily remember account password across network disconnection to allow
automatic reconnection when the network returns to work even if the
password is not permanently saved.

diff -urN pidgin-2.5.2.orig/pidgin/gtkconn.c pidgin-2.5.2/pidgin/gtkconn.c
--- pidgin-2.5.2.orig/pidgin/gtkconn.c	2008-11-21 13:51:35.000000000 -0500
+++ pidgin-2.5.2/pidgin/gtkconn.c	2008-11-21 13:53:03.000000000 -0500
@@ -208,7 +208,10 @@
 	while (l) {
 		PurpleAccount *a = (PurpleAccount*)l->data;
 		if (!purple_account_is_disconnected(a)) {
+			char *password = g_strdup(purple_account_get_password(a));
 			purple_account_disconnect(a);
+			purple_account_set_password(a, password);
+			g_free(password);
 		}
 		l = l->next;
 	}