diff src/account.c @ 5926:6c22d37c6a3c

[gaim-migrate @ 6366] Another "should fix" commit! If calling gaim_connection_disconnect() instead of gaim_account_disconnect() (which was happening at times), the account's connection would never be set to NULL. Now we ensure that if the account's connection is non-NULL, gaim_account_disconnect() is called first instead of gaim_connection_disconnect(). committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 20 Jun 2003 03:55:56 +0000
parents d58406d31a1a
children 03f1d6cd784c
line wrap: on
line diff
--- a/src/account.c	Fri Jun 20 03:41:15 2003 +0000
+++ b/src/account.c	Fri Jun 20 03:55:56 2003 +0000
@@ -176,12 +176,16 @@
 void
 gaim_account_disconnect(GaimAccount *account)
 {
+	GaimConnection *gc;
+
 	g_return_if_fail(account != NULL);
 	g_return_if_fail(gaim_account_is_connected(account));
 
-	gaim_connection_disconnect(account->gc);
+	gc = gaim_account_get_connection(account);
 
-	account->gc = NULL;
+	gaim_account_set_connection(account, NULL);
+
+	gaim_connection_disconnect(gc);
 }
 
 void