]> git.proxmox.com Git - qemu.git/commitdiff
Fixing network over sockets implementation for win32
authorPavel Dovgaluk <Pavel.Dovgaluk@ispras.ru>
Mon, 21 Feb 2011 11:46:44 +0000 (14:46 +0300)
committerBlue Swirl <blauwirbel@gmail.com>
Fri, 25 Feb 2011 15:13:02 +0000 (15:13 +0000)
  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 <pavel.dovgaluk@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
net/socket.c

index 3182b371a72cbbaa6f45adfa578429a4bd2f68c9..7337f4fa1074b5d17c5f639d6ddbbc52cc270d36 100644 (file)
@@ -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 {