[bknr-cvs] r2506 - branches/trunk-reorg/thirdparty/usocket-0.3.5/backend

hhubner at common-lisp.net hhubner at common-lisp.net
Fri Feb 15 16:37:08 UTC 2008


Author: hhubner
Date: Fri Feb 15 11:37:07 2008
New Revision: 2506

Modified:
   branches/trunk-reorg/thirdparty/usocket-0.3.5/backend/openmcl.lisp
Log:
Fix openmcl implementation of select (partly)


Modified: branches/trunk-reorg/thirdparty/usocket-0.3.5/backend/openmcl.lisp
==============================================================================
--- branches/trunk-reorg/thirdparty/usocket-0.3.5/backend/openmcl.lisp	(original)
+++ branches/trunk-reorg/thirdparty/usocket-0.3.5/backend/openmcl.lisp	Fri Feb 15 11:37:07 2008
@@ -37,15 +37,15 @@
       (ccl::fd-zero infds)
       (ccl::fd-zero errfds)
       (dolist (sock sockets)
-        (ccl::fd-set (socket-os-fd sock infds))
-        (ccl::fd-set (socket-os-fd sock errfds)))
+        (ccl::fd-set (ccl::socket-os-fd sock) infds)
+        (ccl::fd-set (ccl::socket-os-fd sock) errfds))
       (let* ((res (ccl::syscall syscalls::select
-                                (1+ (apply #'max fds))
+                                (1+ (apply #'max (mapcar #'ccl::socket-os-fd sockets)))
                                 infds (ccl::%null-ptr) errfds
                                 (if ticks-to-wait tv (ccl::%null-ptr)))))
         (when (> res 0)
           (remove-if #'(lambda (x)
-                         (not (ccl::fd-is-set (socket-os-fd x) infds)))
+                         (not (ccl::fd-is-set (ccl::socket-os-fd x) infds)))
                      sockets))))))
 
 (defun wait-for-input (sockets &optional ticks-to-wait)
@@ -67,7 +67,7 @@
      (raise-error-from-id (openmcl-socket:socket-error-identifier condition)
                           socket condition))
     (ccl::socket-creation-error #| ugh! |#
-     (raise-error-from-id (ccl::socket-creationg-error-identifier condition)
+     (raise-error-from-id (ccl::socket-creation-error-identifier condition)
                           socket condition))
     (error (error 'unknown-error :socket socket :real-error condition))
     (condition (signal 'unknown-condition :real-condition condition))))



More information about the Bknr-cvs mailing list