changeset 11507:18c18cbc0967

[gaim-migrate @ 13752] Fix HEAD bug #16 - offline buddies remain in buddy list after disconnecting committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 11 Sep 2005 15:24:58 +0000
parents 88d504770c60
children c04d93398852
files src/connection.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/connection.c	Sun Sep 11 05:37:31 2005 +0000
+++ b/src/connection.c	Sun Sep 11 15:24:58 2005 +0000
@@ -157,6 +157,7 @@
 	GList *wins;
 #endif
 	GaimPluginProtocolInfo *prpl_info = NULL;
+	gboolean remove = FALSE;
 
 	g_return_if_fail(gc != NULL);
 
@@ -165,7 +166,7 @@
 	gaim_debug_info("connection", "Disconnecting connection %p\n", gc);
 
 	if (gaim_connection_get_state(gc) != GAIM_CONNECTING)
-		gaim_blist_remove_account(account);
+		remove = TRUE;
 
 	gaim_signal_emit(gaim_connections_get_handle(), "signing-off", gc);
 
@@ -195,6 +196,9 @@
 
 	gaim_connection_set_state(gc, GAIM_DISCONNECTED);
 
+	if (remove)
+		gaim_blist_remove_account(account);
+
 	/* LOG	system_log(log_signoff, gc, NULL,
 	   OPT_LOG_BUDDY_SIGNON | OPT_LOG_MY_SIGNON); */
 	gaim_signal_emit(gaim_connections_get_handle(), "signed-off", gc);