qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 3/3] vnc: ensure connection sharing/limits is always configured
Date: Wed,  3 Aug 2016 17:35:22 +0200	[thread overview]
Message-ID: <1470238522-28094-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1470238522-28094-1-git-send-email-kraxel@redhat.com>

From: "Daniel P. Berrange" <berrange@redhat.com>

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 <kraxel@redhat.com>
  Date:   Thu Oct 2 12:09:34 2014 +0200

      vnc: track & limit connections

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1470134726-15697-4-git-send-email-berrange@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 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();
 
-- 
1.8.3.1

  parent reply	other threads:[~2016-08-03 15:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03 15:35 [Qemu-devel] [PULL for-2.7 0/3] vnc: fixes for "-vnc none" Gerd Hoffmann
2016-08-03 15:35 ` [Qemu-devel] [PULL 1/3] vnc: don't crash getting server info if lsock is NULL Gerd Hoffmann
2016-08-03 15:35 ` [Qemu-devel] [PULL 2/3] vnc: fix crash when vnc_server_info_get has an error Gerd Hoffmann
2016-08-03 15:35 ` Gerd Hoffmann [this message]
2016-08-04  9:24 ` [Qemu-devel] [PULL for-2.7 0/3] vnc: fixes for "-vnc none" Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470238522-28094-4-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).