From 881ee71a5c844d69695789be0edc3f22619847cb Mon Sep 17 00:00:00 2001 From: Julian Klemann Date: Wed, 18 May 2022 14:04:13 -0500 Subject: [PATCH] ws2_32: Add stub for SIO_ENABLE_CIRCULAR_QUEUEING in WSAIoctl(). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47233 Signed-off-by: Julian Klemann Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/ws2_32/socket.c | 12 ++++++++++++ dlls/ws2_32/tests/sock.c | 14 ++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 3d0c2deca35..88089fa8d74 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2371,6 +2371,18 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID return ret ? -1 : 0; } + case SIO_ENABLE_CIRCULAR_QUEUEING: + { + NTSTATUS status = STATUS_SUCCESS; + DWORD ret; + + FIXME( "SIO_ENABLE_CIRCULAR_QUEUEING stub\n" ); + ret = server_ioctl_sock( s, IOCTL_AFD_WINE_COMPLETE_ASYNC, &status, sizeof(status), + NULL, 0, ret_size, overlapped, completion ); + SetLastError( ret ); + return ret ? -1 : 0; + } + case SIO_BASE_HANDLE: { NTSTATUS status; diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index f17ffba7a85..bdb683e6796 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -5113,6 +5113,19 @@ static void test_base_handle(void) } } +static void test_circular_queueing(void) +{ + SOCKET s; + DWORD size; + int ret; + + s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + ret = WSAIoctl(s, SIO_ENABLE_CIRCULAR_QUEUEING, NULL, 0, NULL, 0, &size, NULL, NULL); + ok(!ret, "expected 0, got %d\n", ret); + + closesocket(s); +} + static BOOL drain_pause = FALSE; static DWORD WINAPI drain_socket_thread(LPVOID arg) { @@ -12578,6 +12591,7 @@ START_TEST( sock ) test_sioRoutingInterfaceQuery(); test_sioAddressListChange(); test_base_handle(); + test_circular_queueing(); test_unsupported_ioctls(); test_WSASendMsg();