Zebediah Figura : server: Set the event in IOCTL_AFD_EVENT_SELECT if the socket becomes signaled.
Alexandre Julliard
julliard at winehq.org
Thu Jan 6 18:34:09 CST 2022
Module: wine
Branch: master
Commit: 9632048c689801abb7482111773c7714e0f1581a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9632048c689801abb7482111773c7714e0f1581a
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Wed Jan 5 19:03:04 2022 -0600
server: Set the event in IOCTL_AFD_EVENT_SELECT if the socket becomes signaled.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52335
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ws2_32/tests/sock.c | 5 ++---
server/sock.c | 5 +++++
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index aa95e2a3dfa..782b1e59729 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -5159,9 +5159,8 @@ static void test_accept_events(struct event_test_ctx *ctx)
select_events(ctx, listener, FD_CONNECT | FD_READ | FD_OOB | FD_ACCEPT);
ret = WaitForSingleObject(ctx->event, 0);
- todo_wine ok(!ret, "wait timed out\n");
- if (!ret)
- check_events(ctx, FD_ACCEPT, 0, 0);
+ ok(!ret, "wait timed out\n");
+ check_events(ctx, FD_ACCEPT, 0, 0);
server = accept(listener, NULL, NULL);
ok(server != -1, "failed to accept, error %u\n", WSAGetLastError());
diff --git a/server/sock.c b/server/sock.c
index 736f34feac5..c7378306511 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -2543,6 +2543,11 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
sock->nonblocking = 1;
sock_reselect( sock );
+ /* Explicitly wake the socket up if the mask causes it to become
+ * signaled. Note that reselecting isn't enough, since we might already
+ * have had events recorded in sock->reported_events and we don't want
+ * to select for them again. */
+ sock_wake_up( sock );
return;
}
More information about the wine-cvs
mailing list