comparison src/account.c @ 13733:0ab02f082333

[gaim-migrate @ 16144] Disconnect an account before removing it from our list of accounts. This gets rid of an assertion failure when deleting an online account committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 07 May 2006 19:45:02 +0000
parents 74033e0831bc
children 8bda65b88e49
comparison
equal deleted inserted replaced
13732:79720436df40 13733:0ab02f082333
863 863
864 g_return_if_fail(account != NULL); 864 g_return_if_fail(account != NULL);
865 865
866 gaim_debug_info("account", "Destroying account %p\n", account); 866 gaim_debug_info("account", "Destroying account %p\n", account);
867 867
868 if (gaim_account_is_connected(account))
869 gaim_account_disconnect(account);
870
871 gaim_debug_info("account", "Continuing to destroy account %p\n", account);
872
873 for (l = gaim_get_conversations(); l != NULL; l = l->next) 868 for (l = gaim_get_conversations(); l != NULL; l = l->next)
874 { 869 {
875 GaimConversation *conv = (GaimConversation *)l->data; 870 GaimConversation *conv = (GaimConversation *)l->data;
876 871
877 if (gaim_conversation_get_account(conv) == account) 872 if (gaim_conversation_get_account(conv) == account)
2130 { 2125 {
2131 GaimBlistNode *gnode, *cnode, *bnode; 2126 GaimBlistNode *gnode, *cnode, *bnode;
2132 2127
2133 g_return_if_fail(account != NULL); 2128 g_return_if_fail(account != NULL);
2134 2129
2130 if (gaim_account_is_connected(account))
2131 gaim_account_disconnect(account);
2132
2135 gaim_notify_close_with_handle(account); 2133 gaim_notify_close_with_handle(account);
2136 gaim_request_close_with_handle(account); 2134 gaim_request_close_with_handle(account);
2137 2135
2138 gaim_accounts_remove(account); 2136 gaim_accounts_remove(account);
2139 2137