[usocket-cvs] r456 - usocket/branches/0.4.x/backend

Chun Tian (binghe) ctian at common-lisp.net
Wed Oct 22 13:51:20 UTC 2008


Author: ctian
Date: Wed Oct 22 13:51:19 2008
New Revision: 456

Log:
[0.4.x] clean acl code on SOCKET-CONNECT, the same way as
experimental-udp branch.


Modified:
   usocket/branches/0.4.x/backend/allegro.lisp

Modified: usocket/branches/0.4.x/backend/allegro.lisp
==============================================================================
--- usocket/branches/0.4.x/backend/allegro.lisp	(original)
+++ usocket/branches/0.4.x/backend/allegro.lisp	Wed Oct 22 13:51:19 2008
@@ -58,24 +58,21 @@
 
   (let ((socket))
     (setf socket
-          (with-mapped-conditions (socket)
-            (if timeout
-                (mp:with-timeout (timeout nil)
-                  (socket:make-socket :remote-host (host-to-hostname host)
-                                      :remote-port port
-                                      :local-host (when local-host (host-to-hostname local-host))
-                                      :local-port local-port
-                                      :format (to-format element-type)
-                                      :nodelay nodelay))
-                (socket:make-socket :remote-host (host-to-hostname host)
-                                    :remote-port port
-                                    :local-host local-host
-                                    :local-port local-port
-                                    :format (to-format element-type)
-                                    :nodelay nodelay))))
+	  (labels ((make-socket ()
+		     (socket:make-socket :remote-host (host-to-hostname host)
+					 :remote-port port
+					 :local-host (when local-host
+						       (host-to-hostname local-host))
+					 :local-port local-port
+					 :format (to-format element-type)
+					 :nodelay nodelay)))
+	    (with-mapped-conditions (socket)
+	      (if timeout
+		  (mp:with-timeout (timeout nil)
+		    (make-socket))
+		  (make-socket)))))
     (make-stream-socket :socket socket :stream socket)))
 
-
 ;; One socket close method is sufficient,
 ;; because socket-streams are also sockets.
 (defmethod socket-close ((usocket usocket))




More information about the usocket-cvs mailing list