aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2016-08-02 11:45:26 +0100
committerGerd Hoffmann <kraxel@redhat.com>2016-08-03 15:06:32 +0200
commit12e29b1682e0a50ed57c324152addb585ae5ce69 (patch)
tree09e9cea4991f30f60c288fe165988c3e7b7e3578 /ui
parent3e7f136d8b4383d99f1b034a045b73f9b12a4eae (diff)
downloadqemu-12e29b1682e0a50ed57c324152addb585ae5ce69.zip
qemu-12e29b1682e0a50ed57c324152addb585ae5ce69.tar.gz
qemu-12e29b1682e0a50ed57c324152addb585ae5ce69.tar.bz2
vnc: ensure connection sharing/limits is always configured
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>
Diffstat (limited to 'ui')
-rw-r--r--ui/vnc.c3
1 files changed, 3 insertions, 0 deletions
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();