Zebediah Figura : ws2_32: Make getsockopt(SO_DEBUG) into a stub.
Alexandre Julliard
julliard at winehq.org
Wed Jun 23 16:10:10 CDT 2021
Module: wine
Branch: master
Commit: d8dfce3edcdf10d0fd7d65df1e15c15fb4661cad
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d8dfce3edcdf10d0fd7d65df1e15c15fb4661cad
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Wed Jun 23 11:23:47 2021 -0500
ws2_32: Make getsockopt(SO_DEBUG) into a stub.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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);
More information about the wine-cvs
mailing list