[usocket-cvs] r516 - in usocket/branches/0.4.x: . backend

Chun Tian (binghe) ctian at common-lisp.net
Thu Jan 7 23:47:12 UTC 2010


Author: ctian
Date: Thu Jan  7 18:47:11 2010
New Revision: 516

Log:
merge bugfix from trunk (r496-504)

Modified:
   usocket/branches/0.4.x/backend/openmcl.lisp
   usocket/branches/0.4.x/backend/sbcl.lisp
   usocket/branches/0.4.x/condition.lisp

Modified: usocket/branches/0.4.x/backend/openmcl.lisp
==============================================================================
--- usocket/branches/0.4.x/backend/openmcl.lisp	(original)
+++ usocket/branches/0.4.x/backend/openmcl.lisp	Thu Jan  7 18:47:11 2010
@@ -62,9 +62,9 @@
        (raise-error-from-id (openmcl-socket:socket-error-identifier condition)
                             socket condition))
     (ccl:input-timeout
-       (error 'timeout-error :socket socket :real-error condition))
+       (error 'timeout-error :socket socket))
     (ccl:communication-deadline-expired
-       (error 'deadline-error :socket socket :real-error condition))
+       (error 'deadline-timeout-error :socket socket))
     (ccl::socket-creation-error #| ugh! |#
        (raise-error-from-id (ccl::socket-creation-error-identifier condition)
                             socket condition))))
@@ -123,10 +123,14 @@
     (close (socket usocket))))
 
 (defmethod get-local-address ((usocket usocket))
-  (hbo-to-vector-quad (openmcl-socket:local-host (socket usocket))))
+  (let ((address (openmcl-socket:local-host (socket usocket))))
+    (when address
+      (hbo-to-vector-quad address))))
 
 (defmethod get-peer-address ((usocket stream-usocket))
-  (hbo-to-vector-quad (openmcl-socket:remote-host (socket usocket))))
+  (let ((address (openmcl-socket:remote-host (socket usocket))))
+    (when address
+      (hbo-to-vector-quad address))))
 
 (defmethod get-local-port ((usocket usocket))
   (openmcl-socket:local-port (socket usocket)))

Modified: usocket/branches/0.4.x/backend/sbcl.lisp
==============================================================================
--- usocket/branches/0.4.x/backend/sbcl.lisp	(original)
+++ usocket/branches/0.4.x/backend/sbcl.lisp	Thu Jan  7 18:47:11 2010
@@ -50,7 +50,8 @@
    "#include <winsock2.h>")
 
   (ffi:clines
-   "#include <sys/time.h>"
+   #+:msvc "#include <time.h>"
+   #-:msvc "#include <sys/time.h>"
    "#include <ecl/ecl-inl.h>")
 
   #+:prefixed-api
@@ -174,6 +175,8 @@
      . socket-type-not-supported-error)
     (sb-bsd-sockets:network-unreachable-error . network-unreachable-error)
     (sb-bsd-sockets:operation-timeout-error . timeout-error)
+    #-ecl
+    (sb-sys:io-timeout . timeout-error)
     (sb-bsd-sockets:socket-error . ,#'map-socket-error)
 
     ;; Nameservice errors: mapped to unknown-error

Modified: usocket/branches/0.4.x/condition.lisp
==============================================================================
--- usocket/branches/0.4.x/condition.lisp	(original)
+++ usocket/branches/0.4.x/condition.lisp	Thu Jan  7 18:47:11 2010
@@ -111,6 +111,7 @@
    host-unreachable-error
    shutdown-error
    timeout-error
+   deadline-timeout-error
    invalid-socket-error
    invalid-socket-stream-error)
   (socket-error))
@@ -183,7 +184,7 @@
     ((49 99) . address-not-available-error)
     ((9) . bad-file-descriptor-error)
     ((61 111) . connection-refused-error)
-    ((64 131) . connection-reset-error)
+    ((54 104) . connection-reset-error)
     ((53 103) . connection-aborted-error)
     ((22) . invalid-argument-error)
     ((55 105) . no-buffers-error)




More information about the usocket-cvs mailing list