From nobody Sat Apr 20 04:42:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1555343459; cv=none; d=zoho.com; s=zohoarc; b=aTul6ejVZYhp9ZbG07NxCJM00qQtQGpPWsiH4nyHmxi6QA7CcR68o5lVzTHug69R97MsfWrMNFLHeYTlLWr8twFOIWd4H+S9RksQfjoyC3RArZuYgnIXNpahFeUzf/3rJSK7NMVHqkoZV9gebuD+1+f5rVavGHB1wpmmyn8E0AM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555343459; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=10p1cpUVPUe4YcW08BUTB3ZEq55PF8YowCor7hLVNe4=; b=dK8tMxnOLSfg66puPfTvxwStc53+9ve9JPIuDRb78gVoyJtywBpnNu3gRN+Bq0WdHUFFII7JiNKYe289zEwLZHqesvhXVazeOLQk8bPPt0eUK+AT/W3Yjcqg1RRLSTl09XiApYYnPum3jdc2dqsEcxpyCvgLARVXznrfYseRATo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1555343459957230.6866210192087; Mon, 15 Apr 2019 08:50:59 -0700 (PDT) Received: from localhost ([127.0.0.1]:52080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hG3sg-0004Uw-R3 for importer@patchew.org; Mon, 15 Apr 2019 11:50:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hG3r7-0003dX-Kn for qemu-devel@nongnu.org; Mon, 15 Apr 2019 11:49:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hG3r6-0004KN-QA for qemu-devel@nongnu.org; Mon, 15 Apr 2019 11:49:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45330) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hG3r6-0004Gk-JF for qemu-devel@nongnu.org; Mon, 15 Apr 2019 11:49:12 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5893F307D857 for ; Mon, 15 Apr 2019 15:49:10 +0000 (UTC) Received: from localhost (unknown [10.36.112.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF47519C71; Mon, 15 Apr 2019 15:49:07 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Mon, 15 Apr 2019 17:49:06 +0200 Message-Id: <20190415154906.14621-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Mon, 15 Apr 2019 15:49:10 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] socket: allow wait=false for client socket X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Commit 767abe7 ("chardev: forbid 'wait' option with client sockets") is a bit too strict. Current libvirt always set wait=3Dfalse, and will thus fail to add client chardev. Make the code more permissive, allowing wait=3Dfalse with client socket chardevs. Fixes: 767abe7f49e8be14d29da5db3527817b5d696a52 Cc: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- chardev/char-socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 3916505d67..2ad9c9eea5 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -1262,7 +1262,7 @@ static bool qmp_chardev_validate_socket(ChardevSocket= *sock, error_setg(errp, "%s", "Websocket client is not implemented"); return false; } - if (sock->has_wait) { + if (sock->has_wait && sock->wait) { error_setg(errp, "%s", "'wait' option is incompatible with " "socket in client connect mode"); --=20 2.21.0.313.ge35b8cb8e2