[slime-cvs] CVS slime

CVS User heller heller at common-lisp.net
Sun Dec 4 14:54:35 UTC 2011


Update of /project/slime/cvsroot/slime
In directory tiger.common-lisp.net:/tmp/cvs-serv5966

Modified Files:
	ChangeLog swank-rpc.lisp 
Log Message:
* swank-rpc.lisp (read-chunk): Signal end-of-file we had no input.

--- /project/slime/cvsroot/slime/ChangeLog	2011/12/03 15:31:08	1.2261
+++ /project/slime/cvsroot/slime/ChangeLog	2011/12/04 14:54:35	1.2262
@@ -1,3 +1,7 @@
+2011-12-04  Helmut Eller  <heller at common-lisp.net>
+
+	* swank-rpc.lisp (read-chunk): Signal end-of-file we had no input.
+
 2011-12-03  Nikodemus Siivola  <nikodemus at random-state.net>
 
 	* swank-sbcl.lisp (wait-for-input): Another go at this. Rip out POLL,
--- /project/slime/cvsroot/slime/swank-rpc.lisp	2011/11/08 08:15:34	1.9
+++ /project/slime/cvsroot/slime/swank-rpc.lisp	2011/12/04 14:54:35	1.10
@@ -59,9 +59,14 @@
 (defun read-chunk (stream length)
   (let* ((buffer (make-array length :element-type '(unsigned-byte 8)))
          (count (read-sequence buffer stream)))
-    (assert (= count length) () "Short read: length=~D  count=~D" length count)
-    buffer))
+    (cond ((= count length)
+           buffer)
+          ((zerop count)
+           (error (make-condition 'end-of-file :stream stream)))
+          (t
+           (error "Short read: length=~D  count=~D" length count)))))
 
+;; end-of-file
 ;; FIXME: no one ever tested this and will probably not work.
 (defparameter *validate-input* nil
   "Set to true to require input that strictly conforms to the protocol")





More information about the slime-cvs mailing list