Mercurial > pidgin
comparison libpurple/protocols/novell/novell.c @ 20816:efa448405f3d
Remove explicit setting of wants_to_die from prpls.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Tue, 09 Oct 2007 13:42:15 +0000 |
parents | 682543aced31 |
children | ba41f2a60253 |
comparison
equal
deleted
inserted
replaced
20815:7a7b3a425666 | 20816:efa448405f3d |
---|---|
131 /* Don't attempt to auto-reconnect if our | 131 /* Don't attempt to auto-reconnect if our |
132 * password was invalid. | 132 * password was invalid. |
133 */ | 133 */ |
134 if (!purple_account_get_remember_password(gc->account)) | 134 if (!purple_account_get_remember_password(gc->account)) |
135 purple_account_set_password(gc->account, NULL); | 135 purple_account_set_password(gc->account, NULL); |
136 gc->wants_to_die = TRUE; | |
137 reason = PURPLE_REASON_AUTHENTICATION_FAILED; | 136 reason = PURPLE_REASON_AUTHENTICATION_FAILED; |
138 break; | 137 break; |
139 default: | 138 default: |
140 /* FIXME: There are other reasons login could fail */ | 139 /* FIXME: There are other reasons login could fail */ |
141 reason = PURPLE_REASON_NETWORK_ERROR; | 140 reason = PURPLE_REASON_NETWORK_ERROR; |
2017 PurpleAccount *account = user->client_data; | 2016 PurpleAccount *account = user->client_data; |
2018 | 2017 |
2019 gc = purple_account_get_connection(account); | 2018 gc = purple_account_get_connection(account); |
2020 if (gc) | 2019 if (gc) |
2021 { | 2020 { |
2022 gc->wants_to_die = TRUE; /* we don't want to reconnect in this case */ | |
2023 if (!purple_account_get_remember_password(account)) | 2021 if (!purple_account_get_remember_password(account)) |
2024 purple_account_set_password(account, NULL); | 2022 purple_account_set_password(account, NULL); |
2025 purple_connection_error_reason (gc, PURPLE_REASON_NAME_IN_USE, | 2023 purple_connection_error_reason (gc, PURPLE_REASON_NAME_IN_USE, |
2026 _("You have been logged out because you" | 2024 _("You have been logged out because you" |
2027 " logged in at another workstation.")); | 2025 " logged in at another workstation.")); |
2176 /* TODO: Would be nice to prompt if not set! | 2174 /* TODO: Would be nice to prompt if not set! |
2177 * purple_request_fields(gc, _("Server Address"),...); | 2175 * purple_request_fields(gc, _("Server Address"),...); |
2178 */ | 2176 */ |
2179 | 2177 |
2180 /* ...but for now just error out with a nice message. */ | 2178 /* ...but for now just error out with a nice message. */ |
2181 gc->wants_to_die = TRUE; | |
2182 purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS, | 2179 purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS, |
2183 _("Unable to connect to server. Please enter the " | 2180 _("Unable to connect to server. Please enter the " |
2184 "address of the server you wish to connect to.")); | 2181 "address of the server you wish to connect to.")); |
2185 return; | 2182 return; |
2186 } | 2183 } |
2205 | 2202 |
2206 user->conn->ssl_conn->data = purple_ssl_connect(user->client_data, | 2203 user->conn->ssl_conn->data = purple_ssl_connect(user->client_data, |
2207 user->conn->addr, user->conn->port, | 2204 user->conn->addr, user->conn->port, |
2208 novell_ssl_connected_cb, novell_ssl_connect_error, gc); | 2205 novell_ssl_connected_cb, novell_ssl_connect_error, gc); |
2209 if (user->conn->ssl_conn->data == NULL) { | 2206 if (user->conn->ssl_conn->data == NULL) { |
2210 gc->wants_to_die = TRUE; | |
2211 purple_connection_error_reason (gc, | 2207 purple_connection_error_reason (gc, |
2212 PURPLE_REASON_NO_SSL_SUPPORT, | 2208 PURPLE_REASON_NO_SSL_SUPPORT, |
2213 _("Error. SSL support is not installed.")); | 2209 _("Error. SSL support is not installed.")); |
2214 } | 2210 } |
2215 } | 2211 } |