On 6/29/21 3:40 AM, Hans Leidekker wrote:
On Mon, 2021-06-28 at 22:39 -0500, Zebediah Figura wrote:
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 89fb7d3462b..3f15bb4e39b 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3575,21 +3575,8 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname, case WS_SO_REUSEADDR: return server_setsockopt( s, IOCTL_AFD_WINE_SET_SO_REUSEADDR, optval, optlen );
/* Some options need some conversion before they can be sent to* setsockopt. The conversions are done here, then they will fall through* to the general case. Special options that are not passed to* setsockopt follow below that.*/case WS_SO_SNDBUF:
if (!*(const int *)optval){FIXME("SO_SNDBUF ignoring request to disable send buffering\n");-#ifdef __APPLE__
return 0;-#endif
}convert_sockopt(&level, &optname);break;
return server_setsockopt( s, IOCTL_AFD_WINE_SET_SO_SNDBUF, optval, optlen );You didn't move the early return for macOS (or the fixme, which should probably be moved into the ifdef). setsockopt(SO_SNDBUF) fails on macOS if a zero value is passed.
Thanks for pointing out the error; I'll send a new revision.
WRT the fixme, I deleted it because we can at least lie accurately now, and because printing error messages from the server is discouraged.