From 7afd1ad6c65dc981977d695e594d7480a0fe137e Mon Sep 17 00:00:00 2001 From: murata Date: Sun, 15 Oct 2000 02:06:56 +0000 Subject: [PATCH] (elmo-network-initialize-session): Read greeting response. (elmo-network-setup-session): Define. Call `elmo-nntp-send-mode-reader' when session opened. --- elmo/elmo-nntp.el | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/elmo/elmo-nntp.el b/elmo/elmo-nntp.el index 1da8e3a..c6e6f72 100644 --- a/elmo/elmo-nntp.el +++ b/elmo/elmo-nntp.el @@ -181,7 +181,11 @@ Don't cache if nil.") (luna-define-method elmo-network-initialize-session ((session elmo-nntp-session)) (set-process-filter (elmo-network-session-process-internal session) - 'elmo-nntp-process-filter)) + 'elmo-nntp-process-filter) + (with-current-buffer (elmo-network-session-buffer session) + (setq elmo-nntp-read-point (point-min)) + (or (elmo-nntp-read-response session t) + (error "cannot open network")))) (luna-define-method elmo-network-authenticate-session ((session elmo-nntp-session)) @@ -198,8 +202,13 @@ Don't cache if nil.") (format "authinfo pass %s" (elmo-get-passwd (elmo-network-session-password-key session)))) (or (elmo-nntp-read-response session) - (signal 'elmo-authenticate-error '(authinfo)))) - (run-hooks 'elmo-nntp-opened-hook))) + (signal 'elmo-authenticate-error '(authinfo)))))) + +(luna-define-method elmo-network-setup-session ((session + elmo-nntp-session)) + (if elmo-nntp-send-mode-reader + (elmo-nntp-send-mode-reader session)) + (run-hooks 'elmo-nntp-opened-hook)) (defun elmo-nntp-process-filter (process output) (save-excursion -- 1.7.10.4