summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-03-31 05:44:31 (GMT)
committerhobbs <hobbs>2001-03-31 05:44:31 (GMT)
commit75d342b02911c8253dc621bd25e4c943f65e0f35 (patch)
treef5cd812577ee6ab35141efe08087d98b35fd550b
parentc7da30a5b481d451af9554835e60b5203f439706 (diff)
downloadtcl-75d342b02911c8253dc621bd25e4c943f65e0f35.zip
tcl-75d342b02911c8253dc621bd25e4c943f65e0f35.tar.gz
tcl-75d342b02911c8253dc621bd25e4c943f65e0f35.tar.bz2
* win/tclWinSock.c (SocketEventProc): Fixed race condition in
readability of socket on Windows. [Patch #410674, Bug #219205 #219333]
-rw-r--r--ChangeLog7
-rw-r--r--win/tclWinSock.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4356066..18ccb39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2001-03-30 Jeff Hobbs <jeffh@ActiveState.com>
+ * generic/tclTest.c (TestChannelCmd): added cast to mollify
+ Windows debug build.
+
+ * win/tclWinSock.c (SocketEventProc): Fixed race condition in
+ readability of socket on Windows.
+ [Patch #410674, Bug #219205 #219333]
+
* win/tcl.m4: added imm32.lib to LIBS_GUI for Tk IME support.
* win/Makefile.in (install-libraries): removed extra \s that broke
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 92e88ef..77b68e8 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.19 2000/09/28 06:38:23 hobbs Exp $
+ * RCS: @(#) $Id: tclWinSock.c,v 1.20 2001/03/31 05:44:31 hobbs Exp $
*/
#include "tclWinInt.h"
@@ -836,9 +836,9 @@ SocketEventProc(evPtr, flags)
if ((*winSock.select)(0, &readFds, NULL, NULL, &timeout) != 0) {
mask |= TCL_READABLE;
} else {
+ infoPtr->readyEvents &= ~(FD_READ);
SendMessage(tsdPtr->hwnd, SOCKET_SELECT,
(WPARAM) SELECT, (LPARAM) infoPtr);
- infoPtr->readyEvents &= ~(FD_READ);
}
}
if (events & (FD_WRITE | FD_CONNECT)) {