ws2_32: Use IOCTL_AFD_WINE_GET_SO_SNDBUF.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=8606 Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
252d564c7b
commit
35288d6537
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue