Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
5925:6690934e5ea6 | 5926:6c22d37c6a3c |
---|---|
118 } | 118 } |
119 | 119 |
120 void | 120 void |
121 gaim_connection_disconnect(GaimConnection *gc) | 121 gaim_connection_disconnect(GaimConnection *gc) |
122 { | 122 { |
123 GaimAccount *account; | |
123 GList *wins; | 124 GList *wins; |
124 | 125 |
125 g_return_if_fail(gc != NULL); | 126 g_return_if_fail(gc != NULL); |
127 | |
128 account = gaim_connection_get_account(gc); | |
129 | |
130 if (gaim_account_get_connection(account) != NULL) { | |
131 gaim_account_disconnect(account); | |
132 return; | |
133 } | |
126 | 134 |
127 if (gaim_connection_get_state(gc) != GAIM_DISCONNECTED) { | 135 if (gaim_connection_get_state(gc) != GAIM_DISCONNECTED) { |
128 if (gaim_connection_get_state(gc) != GAIM_CONNECTING) | 136 if (gaim_connection_get_state(gc) != GAIM_CONNECTING) |
129 gaim_blist_remove_account(gaim_connection_get_account(gc)); | 137 gaim_blist_remove_account(gaim_connection_get_account(gc)); |
130 | 138 |