Revision e0c64d08 hw/qxl.c

b/hw/qxl.c
343 343
    SimpleSpiceUpdate *update;
344 344
    QXLCommandRing *ring;
345 345
    QXLCommand *cmd;
346
    int notify;
346
    int notify, ret;
347 347

  
348 348
    switch (qxl->mode) {
349 349
    case QXL_MODE_VGA:
350 350
        dprint(qxl, 2, "%s: vga\n", __FUNCTION__);
351
        update = qemu_spice_create_update(&qxl->ssd);
352
        if (update == NULL) {
353
            return false;
351
        ret = false;
352
        qemu_mutex_lock(&qxl->ssd.lock);
353
        if (qxl->ssd.update != NULL) {
354
            update = qxl->ssd.update;
355
            qxl->ssd.update = NULL;
356
            *ext = update->ext;
357
            ret = true;
354 358
        }
355
        *ext = update->ext;
359
        qemu_mutex_unlock(&qxl->ssd.lock);
356 360
        qxl_log_command(qxl, "vga", ext);
357
        return true;
361
        return ret;
358 362
    case QXL_MODE_COMPAT:
359 363
    case QXL_MODE_NATIVE:
360 364
    case QXL_MODE_UNDEFINED:
......
1304 1308
    vga->ds = graphic_console_init(qxl_hw_update, qxl_hw_invalidate,
1305 1309
                                   qxl_hw_screen_dump, qxl_hw_text_update, qxl);
1306 1310
    qxl->ssd.ds = vga->ds;
1311
    qemu_mutex_init(&qxl->ssd.lock);
1307 1312
    qxl->ssd.bufsize = (16 * 1024 * 1024);
1308 1313
    qxl->ssd.buf = qemu_malloc(qxl->ssd.bufsize);
1309 1314

  

Also available in: Unified diff