aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2013-04-05 13:31:12 +0200
committerMarc Hoersken <info@marc-hoersken.de>2013-04-05 13:33:17 +0200
commit5e722b2d09087bf85325720867f06ad33a1dc71b (patch)
tree73d6b273fd823b21dd5f0c7290c3217786b47b84
parent688124f0e95c28c2fcdf7b98d7069b87c79d97b1 (diff)
sockfilt.c: Fixed handling of multiple fds being signaled
-rw-r--r--tests/server/sockfilt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index 807a2808f..5c7277dfb 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -632,7 +632,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
fds = curlx_sktosi(sock);
/* check if the current internal handle was triggered */
- if(wait != WAIT_FAILED && (wait - WAIT_OBJECT_0) >= idx &&
+ if(wait != WAIT_FAILED && (wait - WAIT_OBJECT_0) <= idx &&
WaitForSingleObjectEx(handle, 0, FALSE) == WAIT_OBJECT_0) {
/* try to handle the event with STD* handle functions */
if(fds == fileno(stdin)) {
@@ -682,7 +682,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
}
else {
/* try to handle the event with the WINSOCK2 functions */
- error = WSAEnumNetworkEvents(fds, NULL, &wsanetevents);
+ error = WSAEnumNetworkEvents(fds, handle, &wsanetevents);
if(error != SOCKET_ERROR) {
/* remove from descriptor set if not ready for read/accept/close */
if(!(wsanetevents.lNetworkEvents & (FD_READ|FD_ACCEPT|FD_CLOSE)))