[usocket-cvs] r469 - usocket/trunk/backend
Chun Tian (binghe)
ctian at common-lisp.net
Tue Oct 28 12:00:40 UTC 2008
Author: ctian
Date: Tue Oct 28 12:00:38 2008
New Revision: 469
Log:
bugfix: ETYPECASE in HANDLE-CONDITION (SCL) should be TYPECASE, Call HOST-TO-HBO should detect NULL first.
Modified:
usocket/trunk/backend/cmucl.lisp
usocket/trunk/backend/scl.lisp
Modified: usocket/trunk/backend/cmucl.lisp
==============================================================================
--- usocket/trunk/backend/cmucl.lisp (original)
+++ usocket/trunk/backend/cmucl.lisp Tue Oct 28 12:00:38 2008
@@ -69,7 +69,9 @@
(setf socket
(let ((args (list (host-to-hbo host) port :stream)))
(when (and local-bind-p (or local-host-p local-port-p))
- (nconc args (list :local-host local-host :local-port local-port)))
+ (nconc args (list :local-host (when local-host
+ (host-to-hbo local-host))
+ :local-port local-port)))
(with-mapped-conditions (socket)
(apply #'ext:connect-to-inet-socket args))))
(if socket
Modified: usocket/trunk/backend/scl.lisp
==============================================================================
--- usocket/trunk/backend/scl.lisp (original)
+++ usocket/trunk/backend/scl.lisp Tue Oct 28 12:00:38 2008
@@ -22,11 +22,11 @@
(defun handle-condition (condition &optional (socket nil))
"Dispatch correct usocket condition."
- (etypecase condition
+ (typecase condition
(ext::socket-error
(scl-map-socket-error (ext::socket-errno condition)
- :socket socket
- :condition condition))))
+ :socket socket
+ :condition condition))))
(defun socket-connect (host port &key (element-type 'character)
timeout deadline (nodelay t nodelay-specified)
@@ -45,7 +45,8 @@
(let* ((socket (let ((args (list (host-to-hbo host) port :kind :stream)))
(when (and patch-udp-p (or local-host-p local-port-p))
- (nconc args (list :local-host (host-to-hbo local-host)
+ (nconc args (list :local-host (when local-host
+ (host-to-hbo local-host))
:local-port local-port)))
(with-mapped-conditions ()
(apply #'ext:connect-to-inet-socket args))))
More information about the usocket-cvs
mailing list