From e97d3c03a7375fd3ea3f9eb7327281ad84a1f8b0 Mon Sep 17 00:00:00 2001 From: okada Date: Tue, 20 Feb 2001 12:59:58 +0000 Subject: [PATCH] synch up with main trunk --- elmo/ChangeLog | 5 +++++ elmo/elmo-imap4.el | 30 +++++++++++++++--------------- elmo/elmo-pop3.el | 3 +++ 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 5f1bf1d..dd91aa6 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2000-02-20 Kenichi OKADA + + * elmo-imap4.el (elmo-network-authenticate-session): Fix. + * elmo-pop3.el (elmo-network-authenticate-session): Add comments. + 2001-02-20 Yuuichi Teranishi * Luna-fy Kenichi OKADA's following changes. diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index fbe723a..110ded9 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -998,21 +998,21 @@ If CHOP-LENGTH is not specified, message set is not chopped." (setq response (elmo-imap4-read-untagged (elmo-network-session-process-internal session))) - (if (elmo-imap4-response-continue-req-p response) - (unless (sasl-next-step client step) - ;; response is '+' but there's no next step. - (signal 'elmo-authenticate-error - (list (intern - (concat "elmo-imap4-auth-" - (downcase name)))))) - ;; response is OK. - (if (elmo-imap4-response-ok-p response) - (throw 'done nil) ; finished. - ;; response is NO or BAD. - (signal 'elmo-authenticate-error - (list (intern - (concat "elmo-imap4-auth-" - (downcase name))))))) + (if (elmo-imap4-response-ok-p response) + (if (sasl-next-step client step) + ;; Bogus server? + (signal 'elmo-authenticate-error + (list (intern + (concat "elmo-imap4-auth-" + (downcase name))))) + ;; The authentication process is finished. + (throw 'done nil))) + (unless (elmo-imap4-response-continue-req-p response) + ;; response is NO or BAD. + (signal 'elmo-authenticate-error + (list (intern + (concat "elmo-imap4-auth-" + (downcase name)))))) (sasl-step-set-data step (elmo-base64-decode-string diff --git a/elmo/elmo-pop3.el b/elmo/elmo-pop3.el index 7ab3f6f..3d7dfc5 100644 --- a/elmo/elmo-pop3.el +++ b/elmo/elmo-pop3.el @@ -338,16 +338,19 @@ This is taken precedence over `elmo-network-stream-type-alist'.") (catch 'done (while t (unless (setq response (elmo-pop3-read-response process t)) + ;; response is NO or BAD. (signal 'elmo-authenticate-error (list (intern (concat "elmo-pop3-auth-" (downcase name)))))) (if (string-match "^\+OK" response) (if (sasl-next-step client step) + ;; Bogus server? (signal 'elmo-authenticate-error (list (intern (concat "elmo-pop3-auth-" (downcase name))))) + ;; The authentication process is finished. (throw 'done nil))) (sasl-step-set-data step -- 1.7.10.4