Received: from [140.186.70.92] (port=43023 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrUG2-0003wn-Bq for qemu-devel@nongnu.org; Mon, 21 Feb 2011 06:48:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrUG0-0004A4-Sn for qemu-devel@nongnu.org; Mon, 21 Feb 2011 06:48:50 -0500 Received: from smtp.ispras.ru ([83.149.198.201]:44984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrUG0-00046A-Hu for qemu-devel@nongnu.org; Mon, 21 Feb 2011 06:48:48 -0500 Received: from PASHAISP (ispserv.ispras.ru [83.149.198.72]) by smtp.ispras.ru (Postfix) with ESMTP id 7D4F25D40C2 for ; Mon, 21 Feb 2011 14:37:44 +0300 (MSK) From: "Pavel Dovgaluk" Date: Mon, 21 Feb 2011 14:46:44 +0300 Message-ID: <000001cbd1bd$035cab20$0a160160$@Dovgaluk@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: [Qemu-devel] [PATCH] Fixing network over sockets implementation for win32 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- net/socket.c | 2 +- 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 {