[usocket-devel] fix for connection-stream external-format in CCL

Chun Tian (binghe) binghe.lisp at gmail.com
Tue Feb 19 05:29:27 UTC 2013


Hi Vsevolod

Thank you for your suggestion.  Your patch has been applied to USOCKET trunk, and I'll release 0.6.1 (current version is actually 0.6.0.1) before the end of this month.

P. S. You can get latest USOCKET source code from SVN:

  svn://common-lisp.net/project/usocket/svn/usocket/trunk

Regards,

Chun Tian (binghe)

在 2013-2-19,1:26, Vsevolod Dyomkin 写道:

> 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
> _______________________________________________
> usocket-devel mailing list
> usocket-devel at common-lisp.net
> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/usocket-devel





More information about the usocket-devel mailing list