# HG changeset patch # User Tim Ringenbach # Date 1103149555 0 # Node ID b234ad7e0dfe2ded2128193ab85b45a4065daffb # Parent f2035bdc427246df1d9fda06254f597bf9c612b4 [gaim-migrate @ 11610] I think this is a better fix for the jabber problem. I think that gaim_account_get_connection should never return NULL when called inside a prpl from a function being called by the core. I think ChipX86 wrote the code that I'm changing that made account->gc = NULL. So if he has any objections, he should raise them. committer: Tailor Script diff -r f2035bdc4272 -r b234ad7e0dfe src/account.c --- a/src/account.c Wed Dec 15 21:03:19 2004 +0000 +++ b/src/account.c Wed Dec 15 22:25:55 2004 +0000 @@ -256,11 +256,13 @@ gaim_debug_info("account", "Disconnecting account %p\n", account); + account->disconnecting = TRUE; gc = gaim_account_get_connection(account); + gaim_connection_disconnect(gc); + gaim_account_set_connection(account, NULL); - - gaim_connection_disconnect(gc); + account->disconnecting = FALSE; } void diff -r f2035bdc4272 -r b234ad7e0dfe src/account.h --- a/src/account.h Wed Dec 15 21:03:19 2004 +0000 +++ b/src/account.h Wed Dec 15 22:25:55 2004 +0000 @@ -62,6 +62,7 @@ char *protocol_id; /**< The ID of the protocol. */ GaimConnection *gc; /**< The connection handle. */ + gboolean disconnecting; /**< The account is currently disconnecting */ GHashTable *settings; /**< Protocol-specific settings. */ GHashTable *ui_settings; /**< UI-specific settings. */ diff -r f2035bdc4272 -r b234ad7e0dfe src/connection.c --- a/src/connection.c Wed Dec 15 21:03:19 2004 +0000 +++ b/src/connection.c Wed Dec 15 22:25:55 2004 +0000 @@ -215,7 +215,7 @@ account = gaim_connection_get_account(gc); - if (gaim_account_get_connection(account) != NULL) { + if (!account->disconnecting) { gaim_account_disconnect(account); return; }