From: teranisi Date: Fri, 22 Dec 2000 06:02:36 +0000 (+0000) Subject: * elmo-imap4.el (elmo-network-authenticate-session): Fixed a logic for X-Git-Tag: wl-2_6-root~155 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f1a39a46ea750f144bf6a4f572f39f2d88f866c6;p=elisp%2Fwanderlust.git * elmo-imap4.el (elmo-network-authenticate-session): Fixed a logic for response checking. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 832f9e7..8524ff1 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2000-12-22 Yuuichi Teranishi + + * elmo-imap4.el (elmo-network-authenticate-session): + Fixed a logic for response checking. + 2000-12-15 Daiki Ueno * elmo-net.el: Add autoload settings for `starttls-negotiate', diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 96a9a12..bb603c6 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -1242,17 +1242,24 @@ If optional argument UNMARK is non-nil, unmark." 'no-lin-break)))))) ;) (catch 'done (while t - (setq response (elmo-imap4-read-untagged - (elmo-network-session-process-internal session))) - (if (and - (null (elmo-imap4-response-continue-req-p response)) - (elmo-imap4-response-ok-p response) - (or (sasl-next-step client step) - (throw 'done nil))) + (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)))))) + (downcase name))))))) (sasl-step-set-data step (elmo-base64-decode-string