Skip to content

Commit

Permalink
vnc: attach names to buffers
Browse files Browse the repository at this point in the history
Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Peter Lieven <[email protected]>
Reviewed-by: Daniel P. Berrange <[email protected]>
Message-id: [email protected]
  • Loading branch information
kraxel committed Nov 5, 2015
1 parent d2b9071 commit 543b958
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ui/vnc-jobs.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ static int vnc_worker_thread_loop(VncJobQueue *queue)
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);
Expand Down Expand Up @@ -302,6 +304,7 @@ static VncJobQueue *vnc_queue_init(void)

qemu_cond_init(&queue->cond);
qemu_mutex_init(&queue->mutex);
buffer_init(&queue->buffer, "vnc-job-queue");
QTAILQ_INIT(&queue->jobs);
return queue;
}
Expand Down
20 changes: 20 additions & 0 deletions ui/vnc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2988,6 +2988,26 @@ static void vnc_connect(VncDisplay *vd, int csock,
vs->csock = csock;
vs->vd = vd;

buffer_init(&vs->input, "vnc-input/%d", csock);
buffer_init(&vs->output, "vnc-output/%d", csock);
buffer_init(&vs->ws_input, "vnc-ws_input/%d", csock);
buffer_init(&vs->ws_output, "vnc-ws_output/%d", csock);
buffer_init(&vs->jobs_buffer, "vnc-jobs_buffer/%d", csock);

buffer_init(&vs->tight.tight, "vnc-tight/%d", csock);
buffer_init(&vs->tight.zlib, "vnc-tight-zlib/%d", csock);
buffer_init(&vs->tight.gradient, "vnc-tight-gradient/%d", csock);
#ifdef CONFIG_VNC_JPEG
buffer_init(&vs->tight.jpeg, "vnc-tight-jpeg/%d", csock);
#endif
#ifdef CONFIG_VNC_PNG
buffer_init(&vs->tight.png, "vnc-tight-png/%d", csock);
#endif
buffer_init(&vs->zlib.zlib, "vnc-zlib/%d", csock);
buffer_init(&vs->zrle.zrle, "vnc-zrle/%d", csock);
buffer_init(&vs->zrle.fb, "vnc-zrle-fb/%d", csock);
buffer_init(&vs->zrle.zlib, "vnc-zrle-zlib/%d", csock);

if (skipauth) {
vs->auth = VNC_AUTH_NONE;
vs->subauth = VNC_AUTH_INVALID;
Expand Down

0 comments on commit 543b958

Please sign in to comment.