Skip to content

Commit

Permalink
vnc: ensure connection sharing/limits is always configured
Browse files Browse the repository at this point in the history
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 e5f34cd
  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>
  • Loading branch information
berrange authored and kraxel committed Aug 3, 2016
1 parent 3e7f136 commit 12e29b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ui/vnc.c
Expand Up @@ -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();

Expand Down

0 comments on commit 12e29b1

Please sign in to comment.