Mercurial > pidgin
diff libpurple/connection.c @ 27590:a08e84032814
merge of '2348ff22f0ff3453774b8b25b36238465580c609'
and 'e76f11543c2a4aa05bdf584f087cbe3439029661'
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sun, 12 Jul 2009 05:43:38 +0000 |
parents | aa2a2eae9c3e |
children | 815d9ce1a8b0 |
line wrap: on
line diff
--- a/libpurple/connection.c Sun Jul 12 05:42:40 2009 +0000 +++ b/libpurple/connection.c Sun Jul 12 05:43:38 2009 +0000 @@ -309,7 +309,7 @@ g_free(gc->password); g_free(gc->display_name); - if (gc->disconnect_timeout) + if (gc->disconnect_timeout > 0) purple_timeout_remove(gc->disconnect_timeout); PURPLE_DBUS_UNREGISTER_POINTER(gc); @@ -515,11 +515,20 @@ static gboolean purple_connection_disconnect_cb(gpointer data) { - PurpleAccount *account = data; - char *password = g_strdup(purple_account_get_password(account)); + PurpleAccount *account; + PurpleConnection *gc; + char *password; + + account = data; + gc = purple_account_get_connection(account); + + gc->disconnect_timeout = 0; + + password = g_strdup(purple_account_get_password(account)); purple_account_disconnect(account); purple_account_set_password(account, password); g_free(password); + return FALSE; } @@ -564,7 +573,7 @@ } /* If we've already got one error, we don't need any more */ - if (gc->disconnect_timeout) + if (gc->disconnect_timeout > 0) return; gc->wants_to_die = purple_connection_error_is_fatal (reason);