aboutsummaryrefslogtreecommitdiff
path: root/net/socket.c
diff options
context:
space:
mode:
authorPavel Dovgaluk <Pavel.Dovgaluk@ispras.ru>2011-02-21 14:46:44 +0300
committerBlue Swirl <blauwirbel@gmail.com>2011-02-25 15:13:02 +0000
commitc7eb1f02edba91e3eec4682fa1adca877696d11d (patch)
tree2da9e0ba342a02de4104f6b4a065512740837821 /net/socket.c
parente1f8c729fa890c67bb4532f22c22ace6fb0e1aaf (diff)
downloadqemu-c7eb1f02edba91e3eec4682fa1adca877696d11d.zip
qemu-c7eb1f02edba91e3eec4682fa1adca877696d11d.tar.gz
qemu-c7eb1f02edba91e3eec4682fa1adca877696d11d.tar.bz2
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 <pavel.dovgaluk@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c
index 3182b37..7337f4f 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 {