* mmelmo-imap4-2.el (mmelmo-imap4-get-mime-entity):
authorteranisi <teranisi>
Mon, 11 Sep 2000 06:14:23 +0000 (06:14 +0000)
committerteranisi <teranisi>
Mon, 11 Sep 2000 06:14:23 +0000 (06:14 +0000)
Clear `elmo-imap4-fetch-callback' and `elmo-imap4-fetch-callback-data'.

* elmo-imap4.el (elmo-network-initialize-session): Skip garbage output
before greeting.
(elmo-imap4-read-part): Use "body.peek" to fetch part.
Clear `elmo-imap4-fetch-callback' and `elmo-imap4-fetch-callback-data'.

elmo/ChangeLog
elmo/elmo-imap4.el
elmo/mmelmo-imap4-2.el

index a9f651b..b6cf352 100644 (file)
@@ -1,3 +1,13 @@
+2000-09-11  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * mmelmo-imap4-2.el (mmelmo-imap4-get-mime-entity):
+       Clear `elmo-imap4-fetch-callback' and `elmo-imap4-fetch-callback-data'.
+
+       * elmo-imap4.el (elmo-network-initialize-session): Skip garbage output
+       before greeting.
+       (elmo-imap4-read-part): Use "body.peek" to fetch part.
+       Clear `elmo-imap4-fetch-callback' and `elmo-imap4-fetch-callback-data'.
+
 2000-09-06  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * mmelmo-imap4-2.el (mime-entity-children): Defined.
index 50f34bf..7df6de7 100644 (file)
@@ -1139,13 +1139,19 @@ If optional argument UNMARK is non-nil, unmark."
   (let ((process (elmo-network-session-process-internal session))
        capability)
     (with-current-buffer (process-buffer process)
-      (set-process-filter process 'elmo-imap4-arrival-filter)
-      (set-process-sentinel process 'elmo-imap4-sentinel)
+      ;; Skip garbage output from process before greeting.
       (while (and (memq (process-status process) '(open run))
-                 (eq elmo-imap4-status 'initial))
-       ;;(message "Waiting for server response...")
+                 (goto-char (point-max))
+                 (forward-line -1)
+                 (not (elmo-imap4-parse-greeting)))
        (accept-process-output process 1))
-      ;(message "")
+      (set-process-filter process 'elmo-imap4-arrival-filter)
+      (set-process-sentinel process 'elmo-imap4-sentinel)
+;;      (while (and (memq (process-status process) '(open run))
+;;               (eq elmo-imap4-status 'initial))
+;;        (message "Waiting for server response...")
+;;       (accept-process-output process 1))
+;;      (message "")
       (unless (memq elmo-imap4-status '(nonauth auth))
        (signal 'elmo-open-error
                (list 'elmo-network-initialize-session)))
@@ -1225,14 +1231,17 @@ If optional argument UNMARK is non-nil, unmark."
         (session (elmo-imap4-get-session spec)))
     (elmo-imap4-session-select-mailbox session
                                       (elmo-imap4-spec-mailbox spec))
+    (with-current-buffer (elmo-network-session-buffer session)
+      (setq elmo-imap4-fetch-callback nil)
+      (setq elmo-imap4-fetch-callback-data nil))
     (elmo-delete-cr
      (elmo-imap4-response-bodydetail-text
       (elmo-imap4-response-value-all
        (elmo-imap4-send-command-wait session
                                     (format
                                      (if elmo-imap4-use-uid
-                                         "uid fetch %s body[%s]"
-                                       "fetch %s body[%s]")
+                                         "uid fetch %s body.peek[%s]"
+                                       "fetch %s body.peek[%s]")
                                      msg part))
        'fetch)))))
 
index dc25503..ff926d7 100644 (file)
   (let* ((spec (elmo-folder-get-spec folder))
         (session (elmo-imap4-get-session spec)))
     (elmo-imap4-session-select-mailbox session (elmo-imap4-spec-mailbox spec))
+    (with-current-buffer (elmo-network-session-buffer session)
+      (setq elmo-imap4-fetch-callback nil)
+      (setq elmo-imap4-fetch-callback-data nil))    
     (mmelmo-imap4-parse-bodystructure-object
      folder
      number