Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ws2_32/socket.c | 8 +++++++- dlls/ws2_32/tests/sock.c | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 320e4b3af2a..ab111f726a9 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2103,7 +2103,6 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
/* Handle common cases. The special cases are below, sorted * alphabetically */ - case WS_SO_DEBUG: case WS_SO_KEEPALIVE: case WS_SO_OOBINLINE: case WS_SO_RCVBUF: @@ -2168,6 +2167,13 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, csinfo->iProtocol = infow.iProtocol; return 0; } + + case WS_SO_DEBUG: + WARN( "returning 0 for SO_DEBUG\n" ); + *(DWORD *)optval = 0; + SetLastError( 0 ); + return 0; + case WS_SO_DONTLINGER: { struct linger lingval; diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index c4a3f953175..7534e75edb3 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -10991,7 +10991,7 @@ static void test_so_debug(void) debug = 0xdeadbeef; ret = getsockopt(s, SOL_SOCKET, SO_DEBUG, (char *)&debug, &len); ok(!ret, "got %d\n", ret); - todo_wine ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError()); + ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError()); ok(len == sizeof(debug), "got len %u\n", len); ok(!debug, "got debug %u\n", debug);
@@ -11006,7 +11006,7 @@ static void test_so_debug(void) debug = 0xdeadbeef; ret = getsockopt(s, SOL_SOCKET, SO_DEBUG, (char *)&debug, &len); ok(!ret, "got %d\n", ret); - todo_wine ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError()); + ok(!WSAGetLastError(), "got error %u\n", WSAGetLastError()); ok(len == sizeof(debug), "got len %u\n", len); todo_wine ok(debug == 1, "got debug %u\n", debug);