Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=8606 Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ws2_32/socket.c | 17 +++-------------- dlls/ws2_32/tests/sock.c | 2 +- 2 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 3f15bb4e39b..562d05ed4be 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2088,20 +2088,6 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, case WS_SO_BROADCAST: return server_getsockopt( s, IOCTL_AFD_WINE_GET_SO_BROADCAST, optval, optlen );
- /* Handle common cases. The special cases are below, sorted - * alphabetically */ - case WS_SO_SNDBUF: - if ( (fd = get_sock_fd( s, 0, NULL )) == -1) - return SOCKET_ERROR; - convert_sockopt(&level, &optname); - if (getsockopt(fd, level, optname, optval, (socklen_t *)optlen) != 0 ) - { - SetLastError(wsaErrno()); - ret = SOCKET_ERROR; - } - release_sock_fd( s, fd ); - return ret; - case WS_SO_BSP_STATE: { CSADDR_INFO *csinfo = (CSADDR_INFO *)optval; @@ -2293,6 +2279,9 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, case WS_SO_REUSEADDR: return server_getsockopt( s, IOCTL_AFD_WINE_GET_SO_REUSEADDR, optval, optlen );
+ case WS_SO_SNDBUF: + return server_getsockopt( s, IOCTL_AFD_WINE_GET_SO_SNDBUF, optval, optlen ); + case WS_SO_SNDTIMEO: { INT64 timeout; diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index a3f7e002ce7..e579b72ecb5 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -1214,7 +1214,7 @@ static void test_set_getsockopt(void) value = 0xdeadbeef; err = getsockopt(s, SOL_SOCKET, SO_SNDBUF, (char *)&value, &size); ok( !err, "getsockopt(SO_SNDBUF) failed error: %u\n", WSAGetLastError() ); - todo_wine ok( value == 4096, "expected 4096, got %u\n", value ); + ok( value == 4096, "expected 4096, got %u\n", value );
/* SO_RCVBUF */ value = 4096;