From: Pavel Dovgaluk Date: Mon, 21 Feb 2011 11:46:44 +0000 (+0300) Subject: Fixing network over sockets implementation for win32 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c7eb1f02edba91e3eec4682fa1adca877696d11d;p=qmiga%2Fqemu.git Fixing network over sockets implementation for win32 MSDN includes the following in WSAEALREADY error description for connect() function: "To preserve backward compatibility, this error is reported as WSAEINVAL to Winsock applications that link to either Winsock.dll or Wsock32.dll". So check of this error code was added to allow network connections through the sockets in Windows. Signed-off-by: Pavel Dovgalyuk Signed-off-by: Blue Swirl --- diff --git a/net/socket.c b/net/socket.c index 3182b371a7..7337f4fa10 100644 --- a/net/socket.c +++ b/net/socket.c @@ -457,7 +457,7 @@ static int net_socket_connect_init(VLANState *vlan, } else if (err == EINPROGRESS) { break; #ifdef _WIN32 - } else if (err == WSAEALREADY) { + } else if (err == WSAEALREADY || err == WSAEINVAL) { break; #endif } else {