Author: ctian Date: Thu Jun 30 09:38:18 2011 New Revision: 666
Log: [LispWorks] Fixed using OPEN-UDP-SOCKET in delivered applications.
Modified: usocket/branches/0.5.x/CHANGES usocket/branches/0.5.x/backend/lispworks.lisp
Modified: usocket/branches/0.5.x/CHANGES ============================================================================== --- usocket/branches/0.5.x/CHANGES Sun Jun 26 08:55:52 2011 (r665) +++ usocket/branches/0.5.x/CHANGES Thu Jun 30 09:38:18 2011 (r666) @@ -1,7 +1,8 @@ 0.5.3:
-* [MCL] Fixed SOCKET-LISTEN on vector addresses like #(0 0 0 0) -* [MCL] Fixed WAIT-FOR-INPUT on passive sockets (stream-server-usocket) +* Bugfix: [MCL] Fixed SOCKET-LISTEN on vector addresses like #(0 0 0 0) +* Bugfix: [MCL] Fixed WAIT-FOR-INPUT on passive sockets (stream-server-usocket) +* Bugfix: [LispWorks] Fixed using OPEN-UDP-SOCKET in delivered applications (thanks to Camille Troillard and Martin Simmons, this fix is from LispWorks-UDP project).
0.5.2:
Modified: usocket/branches/0.5.x/backend/lispworks.lisp ============================================================================== --- usocket/branches/0.5.x/backend/lispworks.lisp Sun Jun 26 08:55:52 2011 (r665) +++ usocket/branches/0.5.x/backend/lispworks.lisp Thu Jun 30 09:38:18 2011 (r666) @@ -28,8 +28,7 @@
#+win32 (eval-when (:load-toplevel :execute) - (fli:register-module "ws2_32") - (comm::ensure-sockets)) + (fli:register-module "ws2_32"))
(fli:define-foreign-function (get-host-name-internal "gethostname" :source) ((return-string (:reference-return (:ef-mb-string :limit 257))) @@ -188,6 +187,20 @@ "Open a unconnected UDP socket. For binding on address ANY(*), just not set LOCAL-ADDRESS (NIL), for binding on random free unused port, set LOCAL-PORT to 0." + + ;; Note: move (ensure-sockets) here to make sure delivered applications + ;; correctly have networking support initialized. + ;; + ;; Following words was from Martin Simmons, forwarded by Camille Troillard: + + ;; Calling comm::ensure-sockets at load time looks like a bug in Lispworks-udp + ;; (it is too early and also unnecessary). + + ;; The LispWorks comm package calls comm::ensure-sockets when it is needed, so I + ;; think open-udp-socket should probably do it too. Calling it more than once is + ;; safe and it will be very fast after the first time. + #+win32 (comm::ensure-sockets) + (let ((socket-fd (comm::socket comm::*socket_af_inet* *socket_sock_dgram* *socket_ip_proto_udp*))) (if socket-fd (progn