From fa03cb7fd212bc07f0253db9ea436383ddc6c08f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 28 Mar 2017 18:06:46 +0200 Subject: [PATCH] vnc: allow to connect with add_client when -vnc none MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Do not skip VNC initialization, in particular of auth method when vnc is configured without sockets, since we should still allow connections through QMP add_client. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1434551 Signed-off-by: Marc-André Lureau Message-id: 20170328160646.21250-1-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- ui/vnc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 821acdd8b0..243e99bb95 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3786,10 +3786,6 @@ void vnc_display_open(const char *id, Error **errp) goto fail; } - if (saddr == NULL) { - return; - } - password = qemu_opt_get_bool(opts, "password", false); if (password) { if (fips_get_state()) { @@ -3974,6 +3970,10 @@ void vnc_display_open(const char *id, Error **errp) register_displaychangelistener(&vd->dcl); } + if (saddr == NULL) { + goto cleanup; + } + if (reverse) { if (vnc_display_connect(vd, saddr, nsaddr, wsaddr, nwsaddr, errp) < 0) { goto fail; -- 2.39.2