[PATCH 5/6] ws2_32: Use IOCTL_AFD_ACCEPT_INTO.

Zebediah Figura z.figura12 at gmail.com
Thu Oct 1 23:14:01 CDT 2020


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/ws2_32/socket.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 031688b2d96..2eb1e1a7307 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -2517,13 +2517,11 @@ static NTSTATUS WS2_async_accept( void *user, IO_STATUS_BLOCK *iosb, NTSTATUS st
 
     if (status == STATUS_ALERTED)
     {
-        SERVER_START_REQ( accept_into_socket )
-        {
-            req->lhandle = wine_server_obj_handle( wsa->listen_socket );
-            req->ahandle = wine_server_obj_handle( wsa->accept_socket );
-            status = wine_server_call( req );
-        }
-        SERVER_END_REQ;
+        obj_handle_t accept_handle = wine_server_obj_handle( wsa->accept_socket );
+        IO_STATUS_BLOCK io;
+
+        status = NtDeviceIoControlFile( wsa->listen_socket, NULL, NULL, NULL, &io, IOCTL_AFD_ACCEPT_INTO,
+                                        &accept_handle, sizeof(accept_handle), NULL, 0 );
 
         if (NtStatusToWSAError( status ) == WSAEWOULDBLOCK)
             return STATUS_PENDING;
-- 
2.28.0




More information about the wine-devel mailing list