From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUXCe-00058n-3B for qemu-devel@nongnu.org; Tue, 02 Aug 2016 06:45:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUXCa-0000ic-My for qemu-devel@nongnu.org; Tue, 02 Aug 2016 06:45:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUXCa-0000iY-AM for qemu-devel@nongnu.org; Tue, 02 Aug 2016 06:45:36 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E05B5C04B312 for ; Tue, 2 Aug 2016 10:45:35 +0000 (UTC) From: "Daniel P. Berrange" Date: Tue, 2 Aug 2016 11:45:26 +0100 Message-Id: <1470134726-15697-4-git-send-email-berrange@redhat.com> In-Reply-To: <1470134726-15697-1-git-send-email-berrange@redhat.com> References: <1470134726-15697-1-git-send-email-berrange@redhat.com> Subject: [Qemu-devel] [PATCH v1 3/3] vnc: ensure connection sharing/limits is always configured List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , "Daniel P. Berrange" The connection sharing / limits are only set in the vnc_display_open() method and so missed when VNC is running with '-vnc none'. This in turn prevents clients being added to the VNC server with the QMP "add_client" command. This was introduced in commit e5f34cdd2da54f28d90889a3afd15fad2d6105ff Author: Gerd Hoffmann Date: Thu Oct 2 12:09:34 2014 +0200 vnc: track & limit connections Signed-off-by: Daniel P. Berrange --- ui/vnc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/vnc.c b/ui/vnc.c index f2f5dc1..4ce9034 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3150,6 +3150,9 @@ void vnc_display_init(const char *id) if (!vs->kbd_layout) exit(1); + vs->share_policy = VNC_SHARE_POLICY_ALLOW_EXCLUSIVE; + vs->connections_limit = 32; + qemu_mutex_init(&vs->mutex); vnc_start_worker_thread(); -- 2.7.4