[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: [PATCH 2/2] server: Reselect the socket returned from accept_socket().
From: Zebediah Figura <zfigura () codeweavers ! com>
Date: 2021-12-29 23:15:33
Message-ID: 20211229231533.20885-2-zfigura () codeweavers ! com
[Download RAW message or body]
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52024
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
---
dlls/ws2_32/tests/sock.c | 4 ++--
server/sock.c | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index ec428acaf32..19ff5a711cc 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -5246,8 +5246,8 @@ static void test_accept_events(struct event_test_ctx *ctx)
server = accept(listener, NULL, NULL);
ok(server != -1, "failed to accept, error %u\n", WSAGetLastError());
ctx->socket = server;
- check_events_todo(ctx, FD_WRITE, 0, 200);
- check_events_todo_event(ctx, 0, 0, 0);
+ check_events(ctx, FD_WRITE, 0, 200);
+ check_events(ctx, 0, 0, 0);
closesocket(server);
closesocket(client);
diff --git a/server/sock.c b/server/sock.c
index 2df4f3d3056..736f34feac5 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -722,6 +722,7 @@ static void complete_async_accept( struct sock *sock, struct \
accept_req *req )
handle = alloc_handle_no_access_check( async_get_thread( async )->process, \
&acceptsock->obj,
GENERIC_READ | GENERIC_WRITE | \
SYNCHRONIZE, OBJ_INHERIT ); acceptsock->wparam = handle;
+ sock_reselect( acceptsock );
release_object( acceptsock );
if (!handle)
{
@@ -2174,6 +2175,7 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, \
struct async *async ) handle = alloc_handle( current->process, &acceptsock->obj,
GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, \
OBJ_INHERIT ); acceptsock->wparam = handle;
+ sock_reselect( acceptsock );
release_object( acceptsock );
set_reply_data( &handle, sizeof(handle) );
return;
--
2.34.1
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic