From patchwork Mon Feb 21 11:46:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Dovgalyuk X-Patchwork-Id: 83826 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 28E57B7121 for ; Mon, 21 Feb 2011 22:49:39 +1100 (EST) Received: from localhost ([127.0.0.1]:41202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrUGm-0003x0-C7 for incoming@patchwork.ozlabs.org; Mon, 21 Feb 2011 06:49:36 -0500 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" To: Date: Mon, 21 Feb 2011 14:46:44 +0300 Message-ID: <000001cbd1bd$035cab20$0a160160$@Dovgaluk@ispras.ru> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcvRvQMu2bIGRu62R/OQH7ucwzf26w== Content-Language: ru X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 83.149.198.201 Subject: [Qemu-devel] [PATCH] Fixing network over sockets implementation for win32 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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 {