diff options
author | andreas_kupries <akupries@shaw.ca> | 2003-10-23 16:28:19 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2003-10-23 16:28:19 (GMT) |
commit | 1d1fdb300f355bc1ed87d097c5210d8f41399e37 (patch) | |
tree | 0309bf80a356452306599d71c3b28bd3a7eab0e0 | |
parent | 03736c0062a33d49dd420b759927e54f7533510c (diff) | |
download | tcl-1d1fdb300f355bc1ed87d097c5210d8f41399e37.zip tcl-1d1fdb300f355bc1ed87d097c5210d8f41399e37.tar.gz tcl-1d1fdb300f355bc1ed87d097c5210d8f41399e37.tar.bz2 |
* win/tclWinSock.c (TcpWatchProc): Watch for FD_CLOSE too when
asked for writable events by the generic layer.
(SocketEventProc): Generate a writable event too when a close is
detected.
Together the changes fix [Bug 599468].
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | win/tclWinSock.c | 6 |
2 files changed, 12 insertions, 3 deletions
@@ -1,3 +1,12 @@ +2003-10-23 Andreas Kupries <andreask@activestate.com> + + * win/tclWinSock.c (TcpWatchProc): Watch for FD_CLOSE too when + asked for writable events by the generic layer. + (SocketEventProc): Generate a writable event too when a close is + detected. + + Together the changes fix [Bug 599468]. + 2003-10-23 Vince Darley <vincentdarley@users.sourceforge.net> * tests/resource.test: diff --git a/win/tclWinSock.c b/win/tclWinSock.c index a562371..c925255 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.38 2003/08/27 19:45:18 davygrvy Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.39 2003/10/23 16:28:19 andreas_kupries Exp $ */ #include "tclWinInt.h" @@ -869,7 +869,7 @@ SocketEventProc(evPtr, flags) Tcl_Time blockTime = { 0, 0 }; Tcl_SetMaxBlockTime(&blockTime); - mask |= TCL_READABLE; + mask |= TCL_READABLE|TCL_WRITABLE; } else if (events & FD_READ) { fd_set readFds; struct timeval timeout; @@ -2256,7 +2256,7 @@ TcpWatchProc(instanceData, mask) infoPtr->watchEvents |= (FD_READ|FD_CLOSE|FD_ACCEPT); } if (mask & TCL_WRITABLE) { - infoPtr->watchEvents |= (FD_WRITE|FD_CONNECT); + infoPtr->watchEvents |= (FD_WRITE|FD_CLOSE|FD_CONNECT); } /* |