From: Sebastian Lackner sebastian@fds-team.de
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40264 Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/ws2_32/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index df068fe..ee265d6 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -5809,9 +5809,10 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname, break;
case WS_SO_RCVBUF: + case WS_SO_SNDBUF: if (*(const int*)optval < 2048) { - WARN("SO_RCVBF for %d bytes is too small: ignored\n", *(const int*)optval ); + WARN("SO_RCVBF/WS_SO_SNDBUF for %d bytes is too small: ignored\n", *(const int*)optval ); return 0; } /* Fall through */ @@ -5828,7 +5829,6 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname, * however, using it the BSD way fixes bug 8513 and seems to be what * most programmers assume, anyway */ case WS_SO_REUSEADDR: - case WS_SO_SNDBUF: case WS_SO_TYPE: convert_sockopt(&level, &optname); break;
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=44465
Your paranoid android.
=== debian9 (32 bit Wine report) ===
ws2_32: sock.c:5440: Test failed: Failed to start overlapped send 0 - 0 - 1048576/1048576 sock.c:5480: Test failed: Failed to start overlapped send 0 - 0
=== debian9 (64 bit Wow Wine report) ===
ws2_32: sock.c:5440: Test failed: Failed to start overlapped send 0 - 0 - 1048576/1048576 sock.c:5480: Test failed: Failed to start overlapped send 0 - 0
On Fri, 2018-11-16 at 03:40 +0000, Alistair Leslie-Hughes wrote:
From: Sebastian Lackner sebastian@fds-team.de
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40264 Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com
dlls/ws2_32/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index df068fe..ee265d6 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -5809,9 +5809,10 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname, break;
case WS_SO_RCVBUF:
case WS_SO_SNDBUF: if (*(const int*)optval < 2048) {
WARN("SO_RCVBF for %d bytes is too small: ignored\n", *(const int*)optval );
WARN("SO_RCVBF/WS_SO_SNDBUF for %d bytes is too small: ignored\n", *(const int*)optval ); return 0;
That bug is about macOS rejecting setsockopt(SO_SNDBUF) with 0 buffer size. This is supposed to disable send buffering on Windows but macOS doesn't support that (nor does Linux, it sets a default value in this case).
I think it would be better to print a fixme for this specific value and then return early only on macOS, to avoid the error from setsockopt.