Mercurial > pidgin.yaz
diff src/connection.c @ 5926:6c22d37c6a3c
[gaim-migrate @ 6366]
Another "should fix" commit! If calling gaim_connection_disconnect()
instead of gaim_account_disconnect() (which was happening at times), the
account's connection would never be set to NULL. Now we ensure that if the
account's connection is non-NULL, gaim_account_disconnect() is called first
instead of gaim_connection_disconnect().
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Fri, 20 Jun 2003 03:55:56 +0000 |
parents | dbe2a2174be9 |
children | 03f1d6cd784c |
line wrap: on
line diff
--- a/src/connection.c Fri Jun 20 03:41:15 2003 +0000 +++ b/src/connection.c Fri Jun 20 03:55:56 2003 +0000 @@ -120,10 +120,18 @@ void gaim_connection_disconnect(GaimConnection *gc) { + GaimAccount *account; GList *wins; g_return_if_fail(gc != NULL); + account = gaim_connection_get_account(gc); + + if (gaim_account_get_connection(account) != NULL) { + gaim_account_disconnect(account); + return; + } + if (gaim_connection_get_state(gc) != GAIM_DISCONNECTED) { if (gaim_connection_get_state(gc) != GAIM_CONNECTING) gaim_blist_remove_account(gaim_connection_get_account(gc));