From: Chris Hanson <org/chris-hanson/cph>
Date: Mon, 19 Jun 2000 20:45:21 +0000 (+0000)
Subject: Fix bug: when fetching MIME message part, must guarantee that the
X-Git-Tag: 20090517-FFI~3486
X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a2c4fd77e3f9208571f289dcd46f70083b04fe62;p=mit-scheme.git

Fix bug: when fetching MIME message part, must guarantee that the
connection is open.
---

diff --git a/v7/src/imail/imail-imap.scm b/v7/src/imail/imail-imap.scm
index 9ff3ffeef..a97a56286 100644
--- a/v7/src/imail/imail-imap.scm
+++ b/v7/src/imail/imail-imap.scm
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: imail-imap.scm,v 1.122 2000/06/19 05:00:50 cph Exp $
+;;; $Id: imail-imap.scm,v 1.123 2000/06/19 20:45:21 cph Exp $
 ;;;
 ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
 ;;;
@@ -900,18 +900,20 @@
       (lambda ()
 	(imap:read-literal-progress-hook imail-ui:progress-meter
 	  (lambda ()
-	    (imap:command:uid-fetch
-	     (imap-folder-connection (message-folder message))
-	     (imap-message-uid message)
-	     `(',(string-append "body["
-				(decorated-string-append
-				 "" "." ""
-				 (map (lambda (x)
-					(if (exact-nonnegative-integer? x)
-					    (number->string x)
-					    (symbol->string x)))
-				      section))
-				"]"))))))))
+	    (with-imap-message-open message
+	      (lambda (connection)
+		(imap:command:uid-fetch
+		 connection
+		 (imap-message-uid message)
+		 `(',(string-append "body["
+				    (decorated-string-append
+				     "" "." ""
+				     (map (lambda (x)
+					    (if (exact-nonnegative-integer? x)
+						(number->string x)
+						(symbol->string x)))
+					  section))
+				    "]"))))))))))
    section
    #f))