Alistair Leslie-Hughes : ws2_32: Ignore a SO_SNDBUF value of 0 on macOS.
Alexandre Julliard
julliard at winehq.org
Sun Mar 3 13:21:30 CST 2019
Module: wine
Branch: oldstable
Commit: b1b6ef827f98fb72a9caecb7d30a9598cda51d50
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b1b6ef827f98fb72a9caecb7d30a9598cda51d50
Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Mon Nov 19 09:33:31 2018 +0100
ws2_32: Ignore a SO_SNDBUF value of 0 on macOS.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40264
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit e7fd1ac3b265f2f86ec832268dbbc5425b78ecfc)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/ws2_32/socket.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 43a623e..1f4a5d5 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -5807,6 +5807,17 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
optlen = sizeof(struct linger);
break;
+ 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;
+
case WS_SO_RCVBUF:
if (*(const int*)optval < 2048)
{
@@ -5827,7 +5838,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;
More information about the wine-cvs
mailing list