comparison src/connection.c @ 5741:1b5e6e6e80e9

[gaim-migrate @ 6165] This should fix some connection bugs. Account's GaimConnections couldn't get set back to NULL. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 04 Jun 2003 08:35:29 +0000
parents 6ec7b32ab1df
children 72fb22b9ac98
comparison
equal deleted inserted replaced
5740:6ec7b32ab1df 5741:1b5e6e6e80e9
47 } 47 }
48 48
49 void 49 void
50 gaim_connection_destroy(GaimConnection *gc) 50 gaim_connection_destroy(GaimConnection *gc)
51 { 51 {
52 GaimAccount *account;
53
52 g_return_if_fail(gc != NULL); 54 g_return_if_fail(gc != NULL);
53 55
54 if (gaim_connection_get_state(gc) != GAIM_DISCONNECTED) { 56 if (gaim_connection_get_state(gc) != GAIM_DISCONNECTED) {
55 gaim_connection_disconnect(gc); 57 gaim_connection_disconnect(gc);
56 58
57 return; 59 return;
58 } 60 }
61
62 account = gaim_connection_get_account(gc);
63 gaim_account_set_connection(account, NULL);
59 64
60 if (gc->display_name != NULL) 65 if (gc->display_name != NULL)
61 g_free(gc->display_name); 66 g_free(gc->display_name);
62 67
63 if (gc->away != NULL) 68 if (gc->away != NULL)