commit 1551109785672cadbd0286472ec38f6ec8015972
parent ff0748945dc74c0925d4fcf8b56b749892faa87a
Author: Colin Leroy <colin@colino.net>
Date: Tue, 18 Jan 2011 11:41:33 +0000
2011-01-18 [colin] 3.7.8cvs37
* src/common/smtp.c
Fix logic on SMTP AUTH: If the selected method isn't
available, say so instead of supposing it'll work.
Fixes bug #2039, 'SMTP AUTHENTICATION'
Diffstat:
4 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,10 @@
+2011-01-18 [colin] 3.7.8cvs37
+
+ * src/common/smtp.c
+ Fix logic on SMTP AUTH: If the selected method isn't
+ available, say so instead of supposing it'll work.
+ Fixes bug #2039, 'SMTP AUTHENTICATION'
+
2011-01-15 [pawel] 3.7.8cvs36
* src/prefs_folder_item.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -4110,3 +4110,4 @@
( cvs diff -u -r 1.96.2.227 -r 1.96.2.228 src/textview.c; ) > 3.7.8cvs34.patchset
( cvs diff -u -r 1.96.2.228 -r 1.96.2.229 src/textview.c; ) > 3.7.8cvs35.patchset
( cvs diff -u -r 1.52.2.80 -r 1.52.2.81 src/prefs_folder_item.c; ) > 3.7.8cvs36.patchset
+( cvs diff -u -r 1.11.2.28 -r 1.11.2.29 src/common/smtp.c; ) > 3.7.8cvs37.patchset
diff --git a/configure.ac b/configure.ac
@@ -12,7 +12,7 @@ MINOR_VERSION=7
MICRO_VERSION=8
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=36
+EXTRA_VERSION=37
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/common/smtp.c b/src/common/smtp.c
@@ -160,20 +160,26 @@ static gint smtp_auth(SMTPSession *session)
session->state = SMTP_AUTH;
- if (session->forced_auth_type == SMTPAUTH_CRAM_MD5 ||
- (session->forced_auth_type == 0 &&
- (session->avail_auth_type & SMTPAUTH_CRAM_MD5) != 0))
+ if ((session->forced_auth_type == SMTPAUTH_CRAM_MD5
+ || session->forced_auth_type == 0)
+ &&
+ (session->avail_auth_type & SMTPAUTH_CRAM_MD5) != 0)
smtp_auth_cram_md5(session);
- else if (session->forced_auth_type == SMTPAUTH_LOGIN ||
- (session->forced_auth_type == 0 &&
- (session->avail_auth_type & SMTPAUTH_LOGIN) != 0))
+ else if ((session->forced_auth_type == SMTPAUTH_LOGIN
+ || session->forced_auth_type == 0)
+ &&
+ (session->avail_auth_type & SMTPAUTH_LOGIN) != 0)
smtp_auth_login(session);
- else if (session->forced_auth_type == SMTPAUTH_PLAIN ||
- (session->forced_auth_type == 0 &&
- (session->avail_auth_type & SMTPAUTH_PLAIN) != 0))
+ else if ((session->forced_auth_type == SMTPAUTH_PLAIN
+ || session->forced_auth_type == 0)
+ &&
+ (session->avail_auth_type & SMTPAUTH_PLAIN) != 0)
smtp_auth_plain(session);
- else {
- log_warning(LOG_PROTOCOL, _("SMTP AUTH not available\n"));
+ else if (session->forced_auth_type == 0) {
+ log_warning(LOG_PROTOCOL, _("No SMTP AUTH method available\n"));
+ return SM_AUTHFAIL;
+ } else {
+ log_warning(LOG_PROTOCOL, _("Selected SMTP AUTH method not available\n"));
return SM_AUTHFAIL;
}