summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2003-10-23 16:24:41 (GMT)
committerandreas_kupries <akupries@shaw.ca>2003-10-23 16:24:41 (GMT)
commit30812e7dd017c24c6fe9087088d51216f735512a (patch)
tree13e53ec7bbeb769fe69a81f22fc2076b35ef2d28
parent9a534e8f58925ff9438f439c31b0513530c6c4c3 (diff)
downloadtcl-30812e7dd017c24c6fe9087088d51216f735512a.zip
tcl-30812e7dd017c24c6fe9087088d51216f735512a.tar.gz
tcl-30812e7dd017c24c6fe9087088d51216f735512a.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--ChangeLog9
-rw-r--r--win/tclWinSock.c6
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 7d48b12..39a33cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2003-10-22 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-22 Andreas Kupries <andreask@activestate.com>
+
* generic/tclIOUtil.c (FsListMounts, FsAddMountsToGlobResult): New
functions. See below for context.
(Tcl_FSMatchInDirectory): Modified to call on the new functions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index b92109b..4586698 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.36 2003/01/16 19:02:00 mdejong Exp $
+ * RCS: @(#) $Id: tclWinSock.c,v 1.36.2.1 2003/10/23 16:24:42 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;
@@ -2254,7 +2254,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);
}
/*