diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-06-19 13:35:59 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-06-19 13:35:59 +0800 |
commit | 75705d57f328f4ad10ad47692024a5c4de89dbc7 (patch) | |
tree | d5820927f4c5e227abe4dea6933fb44c9180cff6 | |
parent | 32ee2c5d283b49a0926806e5b4f82639660a19f2 (diff) | |
download | gsoc2013-evolution-75705d57f328f4ad10ad47692024a5c4de89dbc7.tar gsoc2013-evolution-75705d57f328f4ad10ad47692024a5c4de89dbc7.tar.gz gsoc2013-evolution-75705d57f328f4ad10ad47692024a5c4de89dbc7.tar.bz2 gsoc2013-evolution-75705d57f328f4ad10ad47692024a5c4de89dbc7.tar.lz gsoc2013-evolution-75705d57f328f4ad10ad47692024a5c4de89dbc7.tar.xz gsoc2013-evolution-75705d57f328f4ad10ad47692024a5c4de89dbc7.tar.zst gsoc2013-evolution-75705d57f328f4ad10ad47692024a5c4de89dbc7.zip |
Don't bother trying to authenticate (and thus don't throw up an error
2002-06-19 Jeffrey Stedfast <fejj@ximian.com>
* providers/smtp/camel-smtp-transport.c (smtp_connect): Don't
bother trying to authenticate (and thus don't throw up an error
dialog) unless the server is an ESMTP server and supports
authentication.
* camel-sasl-plain.c: Change the user-friendly name to PLAIN, this
is what it should be. Not "Password" because user's immediately
think that they need authentication when they see "Password" even
if they don't need it at all.
svn path=/trunk/; revision=17232
-rw-r--r-- | camel/ChangeLog | 12 | ||||
-rw-r--r-- | camel/camel-sasl-plain.c | 2 | ||||
-rw-r--r-- | camel/providers/smtp/camel-smtp-transport.c | 11 |
3 files changed, 19 insertions, 6 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 23d8169114..bff4dc09bc 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,15 @@ +2002-06-19 Jeffrey Stedfast <fejj@ximian.com> + + * providers/smtp/camel-smtp-transport.c (smtp_connect): Don't + bother trying to authenticate (and thus don't throw up an error + dialog) unless the server is an ESMTP server and supports + authentication. + + * camel-sasl-plain.c: Change the user-friendly name to PLAIN, this + is what it should be. Not "Password" because user's immediately + think that they need authentication when they see "Password" even + if they don't need it at all. + 2002-06-17 Jeffrey Stedfast <fejj@ximian.com> * camel-vee-folder.c (camel_vee_folder_add_folder): Update the diff --git a/camel/camel-sasl-plain.c b/camel/camel-sasl-plain.c index 6965f32c4d..48d1fc9a01 100644 --- a/camel/camel-sasl-plain.c +++ b/camel/camel-sasl-plain.c @@ -29,7 +29,7 @@ #include "camel-service.h" CamelServiceAuthType camel_sasl_plain_authtype = { - N_("Password"), + N_("PLAIN"), N_("This option will connect to the server using a " "simple password."), diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c index 924bc04a7b..7e5eddb6a0 100644 --- a/camel/providers/smtp/camel-smtp-transport.c +++ b/camel/providers/smtp/camel-smtp-transport.c @@ -424,6 +424,7 @@ static gboolean smtp_connect (CamelService *service, CamelException *ex) { CamelSmtpTransport *transport = CAMEL_SMTP_TRANSPORT (service); + gboolean has_authtypes; /* We (probably) need to check popb4smtp before we connect ... */ if (service->url->authmech && !strcmp (service->url->authmech, "POPB4SMTP")) { @@ -448,18 +449,18 @@ smtp_connect (CamelService *service, CamelException *ex) return FALSE; /* check to see if AUTH is required, if so...then AUTH ourselves */ - if (service->url->authmech) { + has_authtypes = g_hash_table_size (transport->authtypes) > 0; + if (service->url->authmech && (transport->flags & CAMEL_SMTP_TRANSPORT_IS_ESMTP) && has_authtypes) { CamelSession *session = camel_service_get_session (service); CamelServiceAuthType *authtype; gboolean authenticated = FALSE; char *errbuf = NULL; - if (!(transport->flags & CAMEL_SMTP_TRANSPORT_IS_ESMTP) || - !g_hash_table_lookup (transport->authtypes, service->url->authmech)) { + if (!g_hash_table_lookup (transport->authtypes, service->url->authmech)) { camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE, _("SMTP server %s does not support requested " - "authentication type %s"), service->url->host, - service->url->authmech); + "authentication type %s."), + service->url->host, service->url->authmech); camel_service_disconnect (service, TRUE, NULL); return FALSE; } |