[Spice-devel] [PATCH 14/16] Change migrate_timeout() to take reds as data arg

Frediano Ziglio fziglio at redhat.com
Wed Jan 20 07:43:40 PST 2016


From: Jonathon Jongsma <jjongsma at redhat.com>

---
 server/reds.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/reds.c b/server/reds.c
index 00fd1ac..080c0f6 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -2944,6 +2944,7 @@ static void reds_mig_switch(RedsState *reds)
 
 static void migrate_timeout(void *opaque)
 {
+    RedsState *reds = opaque;
     spice_info(NULL);
     spice_assert(reds->mig_wait_connect || reds->mig_wait_disconnect);
     if (reds->mig_wait_connect) {
@@ -3365,7 +3366,7 @@ static int do_spice_init(RedsState *reds, SpiceCoreInterface *core_interface)
     ring_init(&reds->mig_wait_disconnect_clients);
     reds->vm_running = TRUE; /* for backward compatibility */
 
-    if (!(reds->mig_timer = core->timer_add(core, migrate_timeout, NULL))) {
+    if (!(reds->mig_timer = core->timer_add(core, migrate_timeout, reds))) {
         spice_error("migration timer create failed");
     }
 
-- 
2.4.3



More information about the Spice-devel mailing list