[usocket-devel] usocket 0.2.3 bug (openmcl 1.0/darwin32 backend)

hi -- first, thanks for a very useful library. i've run across a bug in the usocket 0.2.3 package, specifically in backend/openmcl.lisp. the openmcl-socket:socket-connect function takes exactly one argument, socket.[1] the usocket code provides two arguments, socket and :element-type. it appears (networking is not necessarily my strong point!) that with sockets of type :stream (i.e., not :datagram) the format is always bivalent, making the :element-type distinction inconsequential.[2] i've provided diff -c output[3] for the fix that i required. please excuse me if this has already been reported (or fixed) already, i didn't see mention of it. cheers. k. [1] http://openmcl.clozure.com/Doc/index.html#SOCKET_002dCONNECT [2] http://openmcl.clozure.com/Doc/index.html#Overview-_003c3_003e [3] *** openmcl.lisp.orig Sat Jan 13 09:18:21 2007 --- openmcl.lisp Sat Jan 13 09:25:42 2007 *************** *** 45,54 **** (let ((mcl-sock (openmcl-socket:make-socket :remote-host (host-to-hostname host) :remote-port port))) ! (openmcl-socket:socket-connect mcl-sock ! :element-type (if (subtypep element-type ! 'character) ! :text :binary)) (make-stream-socket :stream mcl-sock :socket mcl-sock)))) (defmethod socket-close ((usocket usocket)) --- 45,51 ---- (let ((mcl-sock (openmcl-socket:make-socket :remote-host (host-to-hostname host) :remote-port port))) ! (openmcl-socket:socket-connect mcl-sock) (make-stream-socket :stream mcl-sock :socket mcl-sock)))) (defmethod socket-close ((usocket usocket)) -- kevin montuori montuori@gmail.com this signature no verb.

hi -- first, thanks for a very useful library.
Thank you for using it!
i've run across a bug in the usocket 0.2.3 package, specifically in backend/openmcl.lisp. the openmcl-socket:socket-connect function takes exactly one argument, socket.[1] the usocket code provides two arguments, socket and :element-type.
it appears (networking is not necessarily my strong point!) that with sockets of type :stream (i.e., not :datagram) the format is always bivalent, making the :element-type distinction inconsequential.[2]
Thanks for the report! It's not a duplicate report. I've applied your fix in both trunk and the 0.2.x branch and it will be in the next release. For now, you can either use a patched version or use the version from the repository.
i've provided diff -c output[3] for the fix that i required.
Could you provide 'diff -u' output next time please (if there is a next time), that can be run through patch (1) to apply directly.
please excuse me if this has already been reported (or fixed) already, i didn't see mention of it.
No problem. Any bugreport (duplicate or not) is very welcome. I welcome other feedback too (compile warnings that can be eliminated, user experience, etc). Thanks again!
participants (2)
-
Erik Huelsmann
-
kevin montuori