Zebediah Figura : server: Do not signal accept bits if there are accept asyncs queued.

Alexandre Julliard julliard at winehq.org
Thu May 5 15:56:01 CDT 2022


Module: wine
Branch: master
Commit: 753fbb28d5c57ef73392dddd6b9e0c57c0dd675b
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=753fbb28d5c57ef73392dddd6b9e0c57c0dd675b

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Thu May  5 00:43:30 2022 -0500

server: Do not signal accept bits if there are accept asyncs queued.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ws2_32/tests/afd.c  | 2 +-
 dlls/ws2_32/tests/sock.c | 4 ++--
 server/sock.c            | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/ws2_32/tests/afd.c b/dlls/ws2_32/tests/afd.c
index 2ace83f5e21..5b64ccd7715 100644
--- a/dlls/ws2_32/tests/afd.c
+++ b/dlls/ws2_32/tests/afd.c
@@ -722,7 +722,7 @@ static void test_poll(void)
     ok(!size, "got size %lu\n", size);
 
     ret = WaitForSingleObject(event, 0);
-    todo_wine ok(ret == WAIT_TIMEOUT, "got %#x\n", ret);
+    ok(ret == WAIT_TIMEOUT, "got %#x\n", ret);
 
     closesocket(server);
     closesocket(client);
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 17719bfaacd..f17ffba7a85 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -5578,7 +5578,7 @@ static void test_accept_events(struct event_test_ctx *ctx)
     ok(ret, "got error %lu\n", GetLastError());
     ok(!size, "got size %lu\n", size);
 
-    check_events_todo(ctx, 0, 0, 0);
+    check_events(ctx, 0, 0, 0);
 
     closesocket(server);
     closesocket(client);
@@ -5587,7 +5587,7 @@ static void test_accept_events(struct event_test_ctx *ctx)
     ret = connect(client, (struct sockaddr *)&destaddr, sizeof(destaddr));
     ok(!ret, "got error %u\n", WSAGetLastError());
 
-    check_events_todo(ctx, FD_ACCEPT, 0, 200);
+    check_events(ctx, FD_ACCEPT, 0, 200);
     check_events(ctx, 0, 0, 0);
 
     server = accept(listener, NULL, NULL);
diff --git a/server/sock.c b/server/sock.c
index aa62a03d699..e46be9349e2 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -990,6 +990,7 @@ static int sock_dispatch_asyncs( struct sock *sock, int event, int error )
             if (req->iosb->status == STATUS_PENDING && !req->accepted)
             {
                 complete_async_accept( sock, req );
+                event &= ~POLLIN;
                 break;
             }
         }




More information about the wine-cvs mailing list