Module: wine Branch: master Commit: b9591e21cfbe62a0c523524f0214f05d783239a7 URL: https://source.winehq.org/git/wine.git/?a=commit;h=b9591e21cfbe62a0c523524f0...
Author: Rob Hughes rbhughes@gmail.com Date: Tue Mar 12 16:14:19 2019 +0000
ws2_32: Handle EISCONN from sendmsg.
When calling sendmsg on a socket that's already connected, some implementations will return EISCONN if you specify a recipient (notably, Darwin/OSX with UDP connections). Newer versions of Linux and Windows will simply ignore the destination parameter.
Signed-off-by: Rob Hughes rbhughes@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ws2_32/socket.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 3755338..a56e284 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2628,6 +2628,12 @@ static int WS2_send( int fd, struct ws2_async *wsa, int flags )
while ((ret = sendmsg(fd, &hdr, flags)) == -1) { + if (errno == EISCONN) + { + hdr.msg_name = 0; + hdr.msg_namelen = 0; + continue; + } if (errno != EINTR) return -1; }