From 41e5c593904acf525792257b7e39c8f110fa3ce7 Mon Sep 17 00:00:00 2001 From: "hechee@blackhole.universe.org" <> Date: Mon, 4 Dec 2006 22:46:23 +0100 Subject: [PATCH] Bugfixes. --- sockets/conditions.lisp | 2 +- sockets/socket-methods.lisp | 7 ++++--- sockets/socket-options.lisp | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sockets/conditions.lisp b/sockets/conditions.lisp index 66c4ee5..3013556 100644 --- a/sockets/conditions.lisp +++ b/sockets/conditions.lisp @@ -72,7 +72,7 @@ values, et caetera).")) (define-condition ,name (socket-error) () (:default-initargs :code (unixerr-value ,identifier) :identifier ,identifier) - (:documentation ,documentation)))) + (:documentation ,(or documentation ""))))) (define-socket-error socket-address-in-use-error :eaddrinuse) (define-socket-error socket-address-not-available-error :eaddrnotavail) diff --git a/sockets/socket-methods.lisp b/sockets/socket-methods.lisp index 9af4dd9..e9e9cd1 100644 --- a/sockets/socket-methods.lisp +++ b/sockets/socket-methods.lisp @@ -77,6 +77,7 @@ (setf proto protocol) (iomux:finalize-object-closing-fd socket fd)))) +;; TODO: find out how to make an FD-STREAM on other implementations (defun make-fd-stream (fd) #+sbcl (sb-sys:make-fd-stream fd @@ -563,7 +564,7 @@ (et:sendto (socket-fd socket) buff-sap bufflen flags - (if remote-address ss nil) + (if remote-address ss (null-pointer)) (if remote-address #.(foreign-type-size 'et:sockaddr-storage) 0))))))))) (defmethod socket-send (buffer (socket passive-socket) &key) @@ -583,7 +584,7 @@ ((simple-array ub8 (*)) (values buff start (- end start))) (simple-base-string (values buff start (- end start)))))) -(defmethod socket-receive :before ((buffer simple-array) +(defmethod socket-receive :before ((buffer array) (socket active-socket) &key start end) (check-type start (or unsigned-byte null) @@ -591,7 +592,7 @@ (check-type end (or unsigned-byte null) "a non-negative value or NIL")) -(defmethod socket-receive ((buffer simple-array) +(defmethod socket-receive ((buffer array) (socket active-socket) &key start end out-of-band peek wait-all dont-wait (no-signal *no-sigpipe*)) diff --git a/sockets/socket-options.lisp b/sockets/socket-options.lisp index e9e035e..e2cc6f0 100644 --- a/sockets/socket-options.lisp +++ b/sockets/socket-options.lisp @@ -72,7 +72,7 @@ (defun get-socket-option-int (fd level option) (with-foreign-objects ((optval :int) -< (optlen :socklen)) + (optlen :socklen)) (setf (mem-ref optlen :int) et:size-of-int) (et:getsockopt fd level option optval optlen) (values optval))) -- 2.11.4.GIT