Skip to contentSkip to conversation

vnc: allow to connect with add_client when -vnc none

PATCH New Marc-André Lureau 1 participant 1 message Mar 28, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vnc: allow to connect with add_client when -vnc none

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

---
 ui/vnc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
ui/vnc.c +4 -4
index 821acdd8b0..243e99bb95 100644
@@ -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;
Signature · 1 line
2.12.0.191.gc5d8de91d