changeset 5741:1b5e6e6e80e9

[gaim-migrate @ 6165] This should fix some connection bugs. Account's GaimConnections couldn't get set back to NULL. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 04 Jun 2003 08:35:29 +0000
parents 6ec7b32ab1df
children e0a1a2110432
files src/account.c src/connection.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/account.c	Wed Jun 04 07:28:36 2003 +0000
+++ b/src/account.c	Wed Jun 04 08:35:29 2003 +0000
@@ -269,7 +269,6 @@
 gaim_account_set_connection(GaimAccount *account, GaimConnection *gc)
 {
 	g_return_if_fail(account != NULL);
-	g_return_if_fail(gc      != NULL);
 
 	account->gc = gc;
 
--- a/src/connection.c	Wed Jun 04 07:28:36 2003 +0000
+++ b/src/connection.c	Wed Jun 04 08:35:29 2003 +0000
@@ -49,6 +49,8 @@
 void
 gaim_connection_destroy(GaimConnection *gc)
 {
+	GaimAccount *account;
+
 	g_return_if_fail(gc != NULL);
 
 	if (gaim_connection_get_state(gc) != GAIM_DISCONNECTED) {
@@ -57,6 +59,9 @@
 		return;
 	}
 
+	account = gaim_connection_get_account(gc);
+	gaim_account_set_connection(account, NULL);
+
 	if (gc->display_name != NULL)
 		g_free(gc->display_name);