Blame SOURCES/kvm-vnc-allow-to-connect-with-add_client-when-vnc-none.patch

5d360b
From d8e67658b944a2b0f235c4384909c2efce4671bd Mon Sep 17 00:00:00 2001
5d360b
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
5d360b
Date: Fri, 9 Jun 2017 14:23:37 +0200
5d360b
Subject: [PATCH 1/4] vnc: allow to connect with add_client when -vnc none
5d360b
MIME-Version: 1.0
5d360b
Content-Type: text/plain; charset=UTF-8
5d360b
Content-Transfer-Encoding: 8bit
5d360b
5d360b
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
5d360b
Message-id: <20170609142337.10457-1-marcandre.lureau@redhat.com>
5d360b
Patchwork-id: 75568
5d360b
O-Subject: [RHEL-7.4 qemu-kvm PATCH] vnc: allow to connect with add_client when -vnc none
5d360b
Bugzilla: 1435352
5d360b
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
5d360b
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
5d360b
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
5d360b
5d360b
Do not skip VNC initialization, in particular of auth method when vnc is
5d360b
configured without sockets, since we should still allow connections
5d360b
through QMP add_client.
5d360b
5d360b
Upstream-status: similar to commit fa03cb7fd212. However, the upstream
5d360b
code changed significantly, so the patch is different.
5d360b
5d360b
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5d360b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
5d360b
---
5d360b
 ui/vnc.c | 4 +---
5d360b
 1 file changed, 1 insertion(+), 3 deletions(-)
5d360b
5d360b
diff --git a/ui/vnc.c b/ui/vnc.c
5d360b
index 1834db0..29b216c 100644
5d360b
--- a/ui/vnc.c
5d360b
+++ b/ui/vnc.c
5d360b
@@ -2993,8 +2993,6 @@ void vnc_display_open(DisplayState *ds, const char *display, Error **errp)
5d360b
         return;
5d360b
     }
5d360b
     vnc_display_close(ds);
5d360b
-    if (strcmp(display, "none") == 0)
5d360b
-        return;
5d360b
 
5d360b
     vs->display = g_strdup(display);
5d360b
     vs->share_policy = VNC_SHARE_POLICY_ALLOW_EXCLUSIVE;
5d360b
@@ -3219,7 +3217,7 @@ void vnc_display_open(DisplayState *ds, const char *display, Error **errp)
5d360b
             goto fail;
5d360b
         }
5d360b
         vnc_connect(vs, csock, 0, 0);
5d360b
-    } else {
5d360b
+    } else if (strcmp(display, "none")) {
5d360b
         /* listen for connects */
5d360b
         char *dpy;
5d360b
         dpy = g_malloc(256);
5d360b
-- 
5d360b
1.8.3.1
5d360b