+2000-12-22 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * elmo-imap4.el (elmo-network-authenticate-session):
+ Fixed a logic for response checking.
+
2000-12-15 Daiki Ueno <ueno@unixuser.org>
* elmo-net.el: Add autoload settings for `starttls-negotiate',
'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