[cl-plus-ssl-cvs] CVS update: cl+ssl/streams.lisp

David Lichteblau dlichteblau at common-lisp.net
Wed Nov 16 17:13:18 UTC 2005


Update of /project/cl-plus-ssl/cvsroot/cl+ssl
In directory common-lisp.net:/tmp/cvs-serv21118

Modified Files:
	streams.lisp 
Log Message:
stream-write-sequence fix, thanks to erik enge

Date: Wed Nov 16 18:13:17 2005
Author: dlichteblau

Index: cl+ssl/streams.lisp
diff -u cl+ssl/streams.lisp:1.1.1.1 cl+ssl/streams.lisp:1.2
--- cl+ssl/streams.lisp:1.1.1.1	Wed Nov  9 23:10:44 2005
+++ cl+ssl/streams.lisp	Wed Nov 16 18:13:17 2005
@@ -74,8 +74,9 @@
 
 (defmethod stream-write-sequence
     ((stream ssl-stream) (thing array)
-     &optional (start 0) (end (length thing)))
+     &optional (start 0) end)
   (check-type thing (simple-array (unsigned-byte 8) (*)))
+  (setf end (or end (length thing)))
   (let ((buf (ssl-stream-io-buffer stream))
         (handle (ssl-stream-handle stream))
 	(socket (ssl-stream-socket stream))
@@ -87,7 +88,8 @@
     ;; argument to WITH-POINTER-TO-VECTOR-DATA, so we need to copy all data:
     (replace buf thing :start2 start :end2 end)
     (cffi-sys::with-pointer-to-vector-data (ptr buf)
-      (ensure-ssl-funcall socket handle #'ssl-write 0.5 handle ptr length))))
+      (ensure-ssl-funcall socket handle #'ssl-write 0.5 handle ptr length)))
+  thing)
 
 
 ;;; minimal character stream implementation




More information about the cl-plus-ssl-cvs mailing list