]> Git Repo - qemu.git/commitdiff
spice: set qxl->ssd.running=true before telling spice to start, RHBZ #733993
authorYonit Halperin <[email protected]>
Mon, 5 Sep 2011 14:39:50 +0000 (17:39 +0300)
committerGerd Hoffmann <[email protected]>
Wed, 7 Sep 2011 07:20:09 +0000 (09:20 +0200)
If qxl->ssd.running=true is set after telling spice to start, the spice server
thread can call qxl_send_events while qxl->ssd.running is still false. This leads to
assert(d->ssd.running).

Signed-off-by: Yonit Halperin <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
ui/spice-display.c

index 498396332cd2a180a100a51e10ef173d599e05ec..e38536114b7ef838ea28c52c6c52e225a3577d8a 100644 (file)
@@ -260,11 +260,12 @@ void qemu_spice_vm_change_state_handler(void *opaque, int running, int reason)
     SimpleSpiceDisplay *ssd = opaque;
 
     if (running) {
+        ssd->running = true;
         qemu_spice_start(ssd);
     } else {
         qemu_spice_stop(ssd);
+        ssd->running = false;
     }
-    ssd->running = running;
 }
 
 void qemu_spice_display_init_common(SimpleSpiceDisplay *ssd, DisplayState *ds)
This page took 0.026836 seconds and 4 git commands to generate.