Mercurial > pidgin.yaz
comparison libpurple/protocols/irc/irc.c @ 20778:8174f6999308
Sprinkle gc->wants_to_die = TRUE liberally around connection errors that really
ought to have been setting it already so that it is always set when a
disconnection reason is fatal. In a couple of other places, fix the reason to
be more accurate and not be fatal.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Fri, 05 Oct 2007 18:33:27 +0000 |
parents | 57e9d1ecefff |
children | 682543aced31 |
comparison
equal
deleted
inserted
replaced
20777:c40416c4eca6 | 20778:8174f6999308 |
---|---|
295 | 295 |
296 gc = purple_account_get_connection(account); | 296 gc = purple_account_get_connection(account); |
297 gc->flags |= PURPLE_CONNECTION_NO_NEWLINES; | 297 gc->flags |= PURPLE_CONNECTION_NO_NEWLINES; |
298 | 298 |
299 if (strpbrk(username, " \t\v\r\n") != NULL) { | 299 if (strpbrk(username, " \t\v\r\n") != NULL) { |
300 gc->wants_to_die = TRUE; | |
300 purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS, | 301 purple_connection_error_reason (gc, PURPLE_REASON_INVALID_SETTINGS, |
301 _("IRC nicks may not contain whitespace")); | 302 _("IRC nicks may not contain whitespace")); |
302 return; | 303 return; |
303 } | 304 } |
304 | 305 |
325 if (purple_ssl_is_supported()) { | 326 if (purple_ssl_is_supported()) { |
326 irc->gsc = purple_ssl_connect(account, irc->server, | 327 irc->gsc = purple_ssl_connect(account, irc->server, |
327 purple_account_get_int(account, "port", IRC_DEFAULT_SSL_PORT), | 328 purple_account_get_int(account, "port", IRC_DEFAULT_SSL_PORT), |
328 irc_login_cb_ssl, irc_ssl_connect_failure, gc); | 329 irc_login_cb_ssl, irc_ssl_connect_failure, gc); |
329 } else { | 330 } else { |
331 gc->wants_to_die = TRUE; | |
330 purple_connection_error_reason (gc, PURPLE_REASON_ENCRYPTION_ERROR, | 332 purple_connection_error_reason (gc, PURPLE_REASON_ENCRYPTION_ERROR, |
331 _("SSL support unavailable")); | 333 _("SSL support unavailable")); |
332 return; | 334 return; |
333 } | 335 } |
334 } | 336 } |