Mercurial > pidgin
comparison src/connection.c @ 5930:03f1d6cd784c
[gaim-migrate @ 6370]
Added debug statements (probably temporary), and fixed a small disconnect
bug.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Fri, 20 Jun 2003 05:41:39 +0000 |
parents | 6c22d37c6a3c |
children | 0ca618645cec |
comparison
equal
deleted
inserted
replaced
5929:b85e88d3fa5f | 5930:03f1d6cd784c |
---|---|
64 gaim_connection_disconnect(gc); | 64 gaim_connection_disconnect(gc); |
65 | 65 |
66 return; | 66 return; |
67 } | 67 } |
68 | 68 |
69 gaim_debug(GAIM_DEBUG_INFO, "connection", | |
70 "Destroying connection %p\n", gc); | |
71 | |
69 account = gaim_connection_get_account(gc); | 72 account = gaim_connection_get_account(gc); |
70 gaim_account_set_connection(account, NULL); | 73 gaim_account_set_connection(account, NULL); |
71 | 74 |
72 if (gc->display_name != NULL) | 75 if (gc->display_name != NULL) |
73 g_free(gc->display_name); | 76 g_free(gc->display_name); |
87 GaimAccount *account; | 90 GaimAccount *account; |
88 GaimConnectionUiOps *ops; | 91 GaimConnectionUiOps *ops; |
89 GaimPluginProtocolInfo *prpl_info = NULL; | 92 GaimPluginProtocolInfo *prpl_info = NULL; |
90 | 93 |
91 g_return_if_fail(gc != NULL); | 94 g_return_if_fail(gc != NULL); |
95 | |
96 gaim_debug(GAIM_DEBUG_INFO, "connection", | |
97 "Connecting. gc = %p\n", gc); | |
92 | 98 |
93 ops = gaim_get_connection_ui_ops(); | 99 ops = gaim_get_connection_ui_ops(); |
94 | 100 |
95 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); | 101 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); |
96 | 102 |
98 | 104 |
99 if ((prpl_info->options & OPT_PROTO_NO_PASSWORD) && | 105 if ((prpl_info->options & OPT_PROTO_NO_PASSWORD) && |
100 !(prpl_info->options & OPT_PROTO_PASSWORD_OPTIONAL) && | 106 !(prpl_info->options & OPT_PROTO_PASSWORD_OPTIONAL) && |
101 gaim_account_get_password(account) == NULL) { | 107 gaim_account_get_password(account) == NULL) { |
102 | 108 |
103 gaim_debug(GAIM_DEBUG_INFO, "connection", "Requestin password\n"); | 109 gaim_debug(GAIM_DEBUG_INFO, "connection", "Requesting password\n"); |
104 | 110 |
105 if (ops != NULL && ops->request_pass != NULL) | 111 if (ops != NULL && ops->request_pass != NULL) |
106 ops->request_pass(gc); | 112 ops->request_pass(gc); |
107 | 113 |
108 return; | 114 return; |
129 | 135 |
130 if (gaim_account_get_connection(account) != NULL) { | 136 if (gaim_account_get_connection(account) != NULL) { |
131 gaim_account_disconnect(account); | 137 gaim_account_disconnect(account); |
132 return; | 138 return; |
133 } | 139 } |
140 | |
141 gaim_debug(GAIM_DEBUG_INFO, "connection", | |
142 "Disconnecting connection %p\n", gc); | |
134 | 143 |
135 if (gaim_connection_get_state(gc) != GAIM_DISCONNECTED) { | 144 if (gaim_connection_get_state(gc) != GAIM_DISCONNECTED) { |
136 if (gaim_connection_get_state(gc) != GAIM_CONNECTING) | 145 if (gaim_connection_get_state(gc) != GAIM_CONNECTING) |
137 gaim_blist_remove_account(gaim_connection_get_account(gc)); | 146 gaim_blist_remove_account(gaim_connection_get_account(gc)); |
138 | 147 |