# HG changeset patch # User Stu Tomlinson # Date 1126452298 0 # Node ID 18c18cbc0967143306541d5232e5601f68c6294f # Parent 88d504770c604f8cd6af80b6cf95fdd61af33719 [gaim-migrate @ 13752] Fix HEAD bug #16 - offline buddies remain in buddy list after disconnecting committer: Tailor Script diff -r 88d504770c60 -r 18c18cbc0967 src/connection.c --- 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);