vnc-jobs.c (2e0c90af0a33451498d333d72c06e5429c7cd168) vnc-jobs.c (c3d6899c5e67dfd7ff195eccc10541f3b7e141a7)
1/*
2 * QEMU VNC display driver
3 *
4 * Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws>
5 * Copyright (C) 2006 Fabrice Bellard
6 * Copyright (C) 2009 Red Hat, Inc
7 * Copyright (C) 2010 Corentin Chary <corentin.chary@gmail.com>
8 *

--- 221 unchanged lines hidden (view full) ---

230 return -1;
231 }
232
233 vnc_lock_output(job->vs);
234 if (job->vs->csock == -1 || job->vs->abort == true) {
235 vnc_unlock_output(job->vs);
236 goto disconnected;
237 }
1/*
2 * QEMU VNC display driver
3 *
4 * Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws>
5 * Copyright (C) 2006 Fabrice Bellard
6 * Copyright (C) 2009 Red Hat, Inc
7 * Copyright (C) 2010 Corentin Chary <corentin.chary@gmail.com>
8 *

--- 221 unchanged lines hidden (view full) ---

230 return -1;
231 }
232
233 vnc_lock_output(job->vs);
234 if (job->vs->csock == -1 || job->vs->abort == true) {
235 vnc_unlock_output(job->vs);
236 goto disconnected;
237 }
238 if (buffer_empty(&job->vs->output)) {
239 /*
240 * Looks like a NOP as it obviously moves no data. But it
241 * moves the empty buffer, so we don't have to malloc a new
242 * one for vs.output
243 */
244 buffer_move_empty(&vs.output, &job->vs->output);
245 }
238 vnc_unlock_output(job->vs);
239
240 /* Make a local copy of vs and switch output buffers */
241 vnc_async_encoding_start(job->vs, &vs);
242
243 /* Start sending rectangles */
244 n_rectangles = 0;
245 vnc_write_u8(&vs, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE);

--- 98 unchanged lines hidden ---
246 vnc_unlock_output(job->vs);
247
248 /* Make a local copy of vs and switch output buffers */
249 vnc_async_encoding_start(job->vs, &vs);
250
251 /* Start sending rectangles */
252 n_rectangles = 0;
253 vnc_write_u8(&vs, VNC_MSG_SERVER_FRAMEBUFFER_UPDATE);

--- 98 unchanged lines hidden ---