From: <no...@so...> - 2002-01-24 18:30:07
|
Bugs item #496733, was opened at 2001-12-25 22:50 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=110894&aid=496733&group_id=10894 Category: 23. Channel Commands Group: 8.4a4 Status: Open Resolution: Accepted Priority: 3 Submitted By: Mo DeJong (mdejong) Assigned to: Mo DeJong (mdejong) Summary: Possible fix for obscure fconfigure bug Initial Comment: I ran into this bug while re-implementing fconfigure in Jacl. It seems the Tcl_GetChannelOption function does not quite know what to do about a channel that is neither readable nor writable. Here is what it currently returns: % set sock [socket -server accept 0] sock3 % fconfigure $sock -blocking 1 -buffering full -buffersize 4096 -encoding iso8859-1 -eofchar -translation -sockname {0.0.0.0 0.0.0.0 2001} The -eofchar and -translation properties should at least have some value in the list. What exactly these properties would be used for on a server socket is not clear. For example, why would you want to set the -blocking property on a server socket? Also note that the Tcl_SetChannelOption method does not know how to set these values since it is not clear if the input out the output value would be changed for a server socket. The quick solution I came up with was to just pretend these values are read only. It was easy to implement and test and I can't imagine this would actually matter to anyone, so it seemed like the right thing to do. The attached patch implements these changes and add some test cases that check the behavior. ---------------------------------------------------------------------- >Comment By: Jeffrey Hobbs (hobbs) Date: 2002-01-24 10:30 Message: Logged In: YES user_id=72656 I would also like to see this applied to the 8-3-1-branch. ---------------------------------------------------------------------- Comment By: Andreas Kupries (andreas_kupries) Date: 2002-01-24 10:20 Message: Logged In: YES user_id=75003 The patch applied with offsets to the current head, but the result was ok. The patched core configured and compiled flawless (Linux). The test "socket-7.3" failed, because the length of the result returned by fconfigure changed now that eofchar and translation have values. I accept the patch, but also ask you to additionally update the failed test before committing everything. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=110894&aid=496733&group_id=10894 |