[usocket-devel] fix for connection-stream external-format in CCL
Vsevolod Dyomkin
vseloved at gmail.com
Mon Feb 18 17:26:34 UTC 2013
HI,
I've noticed a problem in the CCL backend, when the socket is created not
with the default external-format but with NIL external-format which causes
the fallback to ISO-8859-1 and is rather unfortunate. What's even worse is
that it's very hard to alter the format, while initializing it
from ccl:*default-external-format* makes it possible to control this
parameter.
So here's a small change that solves the problem. It's against v.0.5.5, but
I've looked at the code for 0.6.1 and didn't see any change there. If
someone points me to the sources, I can make a proper patch.
diff -u openmcl-new.lisp openmcl.lisp
--- openmcl-new.lisp 2013-02-18 19:18:25.482382100 +0200
+++ openmcl.lisp 2013-02-18 19:16:24.586378860 +0200
@@ -97,6 +97,7 @@
:local-port local-port
:format (to-format element-type)
:deadline deadline
+ :external-format ccl:*default-external-format*
:nodelay nodelay
:connect-timeout timeout)))
(make-stream-socket :stream mcl-sock :socket mcl-sock)))
@@ -107,6 +108,7 @@
:local-host (when local-host
(host-to-hostname local-host))
:local-port local-port
:input-timeout timeout
+ :external-format
ccl:*default-external-format*
:format :binary))
(usocket (make-datagram-socket mcl-sock)))
(when (and host port)
Best,
Vsevolod Dyomkin
+38-096-111-41-56
skype, twitter: vseloved
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/usocket-devel/attachments/20130218/fd472e70/attachment.html>
More information about the usocket-devel
mailing list