[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/20] vnc: fix local state init
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 15/20] vnc: fix local state init |
Date: |
Mon, 16 Nov 2015 18:25:30 +0100 |
Signed-off-by: Gerd Hoffmann <address@hidden>
Reviewed-by: Peter Lieven <address@hidden>
Reviewed-by: Daniel P. Berrange <address@hidden>
Message-id: address@hidden
---
ui/vnc-jobs.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c
index fd9ed39..12389cc 100644
--- a/ui/vnc-jobs.c
+++ b/ui/vnc-jobs.c
@@ -185,6 +185,9 @@ void vnc_jobs_consume_buffer(VncState *vs)
*/
static void vnc_async_encoding_start(VncState *orig, VncState *local)
{
+ buffer_init(&local->output, "vnc-worker-output");
+ local->csock = -1; /* Don't do any network work on this thread */
+
local->vnc_encoding = orig->vnc_encoding;
local->features = orig->features;
local->vd = orig->vd;
@@ -196,7 +199,6 @@ static void vnc_async_encoding_start(VncState *orig,
VncState *local)
local->zlib = orig->zlib;
local->hextile = orig->hextile;
local->zrle = orig->zrle;
- local->csock = -1; /* Don't do any network work on this thread */
}
static void vnc_async_encoding_end(VncState *orig, VncState *local)
@@ -212,12 +214,10 @@ static int vnc_worker_thread_loop(VncJobQueue *queue)
{
VncJob *job;
VncRectEntry *entry, *tmp;
- VncState vs;
+ VncState vs = {};
int n_rectangles;
int saved_offset;
- buffer_init(&vs.output, "vnc-worker-output");
-
vnc_lock_queue(queue);
while (QTAILQ_EMPTY(&queue->jobs) && !queue->exit) {
qemu_cond_wait(&queue->cond, &queue->mutex);
--
1.8.3.1
- [Qemu-devel] [PULL 16/20] vnc: recycle empty vs->output buffer, (continued)
- [Qemu-devel] [PULL 16/20] vnc: recycle empty vs->output buffer, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 19/20] buffer: allow a buffer to shrink gracefully, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 11/20] vnc: add vnc_width+vnc_height helpers, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 03/20] buffer: add buffer_move_empty, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 14/20] vnc: only alloc server surface with clients connected, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 05/20] buffer: add buffer_shrink, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 20/20] vnc: fix mismerge, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 07/20] vnc: attach names to buffers, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 17/20] buffer: factor out buffer_req_size, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 12/20] vnc: factor out vnc_update_server_surface, Gerd Hoffmann, 2015/11/16
- [Qemu-devel] [PULL 15/20] vnc: fix local state init,
Gerd Hoffmann <=
- Re: [Qemu-devel] [PULL for-2.5 00/20] vnc: buffer code improvements, bugfixes., Peter Maydell, 2015/11/17