git.fiddlerwoaroof.com
Browse code

2006-05-24 Kevin Layer <layer@gemini>

layer authored on 24/05/2006 20:38:42
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+2006-05-24  Kevin Layer  <layer@gemini>
2
+
3
+   from dancy:
4
+	* smtp.cl: bug16214: Fix regression in send-smtp behavior
5
+
1 6
 2006-03-24  Kevin Layer  <layer@gemini>
2 7
 
3 8
 	* smtp.cl: rfe6507: fix for socket:ipaddrp being 8.0 only
... ...
@@ -1,14 +1,16 @@
1 1
 #+(version= 8 0)
2
-(sys:defpatch "smtp" 2
2
+(sys:defpatch "smtp" 3
3 3
   "v1: send-letter w/attachments; send-smtp* can take streams;
4
-v2: add :port argument to send-letter, send-smtp, send-smtp-auth."
4
+v2: add :port argument to send-letter, send-smtp, send-smtp-auth;
5
+v3: fix incompatibility introduced in v2."
5 6
   :type :system
6 7
   :post-loadable t)
7 8
 
8 9
 #+(version= 7 0)
9
-(sys:defpatch "smtp" 3
10
+(sys:defpatch "smtp" 4
10 11
   "v2: send-letter w/attachments; send-smtp* can take streams;
11
-v3: add :port argument to send-letter, send-smtp, send-smtp-auth."
12
+v3: add :port argument to send-letter, send-smtp, send-smtp-auth;
13
+v4: fix incompatibility introduced in v3."
12 14
   :type :system
13 15
   :post-loadable t)
14 16
 
... ...
@@ -38,7 +40,7 @@ v3: add :port argument to send-letter, send-smtp, send-smtp-auth."
38 40
 ;; Suite 330, Boston, MA  02111-1307  USA
39 41
 ;;
40 42
 ;;
41
-;; $Id: smtp.cl,v 1.18 2006/03/24 21:22:31 layer Exp $
43
+;; $Id: smtp.cl,v 1.19 2006/05/24 20:38:42 layer Exp $
42 44
 
43 45
 ;; Description:
44 46
 ;;   send mail to an smtp server.  See rfc821 for the spec.
... ...
@@ -291,25 +293,26 @@ Attachments must be filenames, streams, or mime-part-constructed, not ~s"
291 293
 		(prev-ch nil)
292 294
 		ch stream)
293 295
 	    (dolist (message messages)
294
-	      (setf stream (if* (streamp message)
295
-			      then message 
296
-			      else (make-string-input-stream message)))
297
-	      (unwind-protect 
298
-		  (progn
299
-		    (while (setf ch (read-char stream nil nil))
300
-		      (if* (and at-bol (eq ch #\.))
301
-			 then ;; to prevent . from being interpreted as eol
302
-			      (write-char #\. sock))
303
-		      (if* (eq ch #\newline)
304
-			 then (setq at-bol t)
305
-			      (if* (not (eq prev-ch #\return))
306
-				 then (write-char #\return sock))
307
-			 else (setq at-bol nil))
308
-		      (write-char ch sock)
309
-		      (setq prev-ch ch)))
310
-		;; unwind-protect
311
-		(if* (not (streamp message))
312
-		   then (close stream)))))
296
+	      (when message
297
+		(setf stream (if* (streamp message)
298
+				then message 
299
+				else (make-string-input-stream message)))
300
+		(unwind-protect 
301
+		    (progn
302
+		      (while (setf ch (read-char stream nil nil))
303
+			(if* (and at-bol (eq ch #\.))
304
+			   then ;; to prevent . from being interpreted as eol
305
+				(write-char #\. sock))
306
+			(if* (eq ch #\newline)
307
+			   then (setq at-bol t)
308
+				(if* (not (eq prev-ch #\return))
309
+				   then (write-char #\return sock))
310
+			   else (setq at-bol nil))
311
+			(write-char ch sock)
312
+			(setq prev-ch ch)))
313
+		  ;; unwind-protect
314
+		  (if* (not (streamp message))
315
+		     then (close stream))))))
313 316
 		
314 317
 	  (write-char #\return sock) (write-char #\linefeed sock)
315 318
 	  (write-char #\. sock)