5d360b
From 56d3fe342a9c8c8e832e59fc093515e99aa8f677 Mon Sep 17 00:00:00 2001
5d360b
From: "Daniel P. Berrange" <berrange@redhat.com>
5d360b
Date: Thu, 8 Feb 2018 17:50:21 +0100
5d360b
Subject: [PATCH 07/27] vnc: kill jobs queue buffer
5d360b
5d360b
RH-Author: Daniel P. Berrange <berrange@redhat.com>
5d360b
Message-id: <20180208175041.5634-8-berrange@redhat.com>
5d360b
Patchwork-id: 78939
5d360b
O-Subject: [RHEL-7.5 qemu-kvm PATCH v1 07/27] vnc: kill jobs queue buffer
5d360b
Bugzilla: 1527405
5d360b
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
5d360b
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
5d360b
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
5d360b
5d360b
From: Gerd Hoffmann <kraxel@redhat.com>
5d360b
5d360b
RHEL-7 note: the vnc_queue_init() hunk is missing from the downstream
5d360b
patch because the buffer_init() call that the hunk removes only appeared
5d360b
with upstream commit 543b95801f98 ("vnc: attach names to buffers",
5d360b
2015-11-05), as part of v2.5.0.
5d360b
5d360b
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
5d360b
Reviewed-by: Peter Lieven <pl@kamp.de>
5d360b
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
5d360b
Message-id: 1446203414-4013-9-git-send-email-kraxel@redhat.com
5d360b
(cherry picked from commit 8305f917c1bc86b1ead0fa9197b5443a4bd611f3)
5d360b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
5d360b
---
5d360b
 ui/vnc-jobs.c | 5 -----
5d360b
 1 file changed, 5 deletions(-)
5d360b
5d360b
diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c
5d360b
index a141f40..a6dfdf6 100644
5d360b
--- a/ui/vnc-jobs.c
5d360b
+++ b/ui/vnc-jobs.c
5d360b
@@ -53,7 +53,6 @@ struct VncJobQueue {
5d360b
     QemuCond cond;
5d360b
     QemuMutex mutex;
5d360b
     QemuThread thread;
5d360b
-    Buffer buffer;
5d360b
     bool exit;
5d360b
     QTAILQ_HEAD(, VncJob) jobs;
5d360b
 };
5d360b
@@ -192,7 +191,6 @@ static void vnc_async_encoding_start(VncState *orig, VncState *local)
5d360b
     local->zlib = orig->zlib;
5d360b
     local->hextile = orig->hextile;
5d360b
     local->zrle = orig->zrle;
5d360b
-    local->output =  queue->buffer;
5d360b
     local->csock = -1; /* Don't do any network work on this thread */
5d360b
 
5d360b
     buffer_reset(&local->output);
5d360b
@@ -205,8 +203,6 @@ static void vnc_async_encoding_end(VncState *orig, VncState *local)
5d360b
     orig->hextile = local->hextile;
5d360b
     orig->zrle = local->zrle;
5d360b
     orig->lossy_rect = local->lossy_rect;
5d360b
-
5d360b
-    queue->buffer = local->output;
5d360b
 }
5d360b
 
5d360b
 static int vnc_worker_thread_loop(VncJobQueue *queue)
5d360b
@@ -309,7 +305,6 @@ static void vnc_queue_clear(VncJobQueue *q)
5d360b
 {
5d360b
     qemu_cond_destroy(&queue->cond);
5d360b
     qemu_mutex_destroy(&queue->mutex);
5d360b
-    buffer_free(&queue->buffer);
5d360b
     g_free(q);
5d360b
     queue = NULL; /* Unset global queue */
5d360b
 }
5d360b
-- 
5d360b
1.8.3.1
5d360b