[Spice-devel] [PATCH spice-server 08/22] reds: use bool for RedsState::src_do_seamless_migrate

Frediano Ziglio fziglio at redhat.com
Fri Jun 16 09:13:20 UTC 2017


Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/reds-private.h | 4 ++--
 server/reds.c         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/reds-private.h b/server/reds-private.h
index 37af888..68c3c45 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -94,8 +94,8 @@ struct RedsState {
 
     int mig_inprogress;
     int expect_migrate;
-    int src_do_seamless_migrate; /* per migration. Updated after the migration handshake
-                                    between the 2 servers */
+    bool src_do_seamless_migrate; /* per migration. Updated after the migration handshake
+                                     between the 2 servers */
     bool dst_do_seamless_migrate; /* per migration. Updated after the migration handshake
                                      between the 2 servers */
     GList *mig_target_clients;
diff --git a/server/reds.c b/server/reds.c
index 168b3d8..b0478f2 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1158,7 +1158,7 @@ void reds_on_main_agent_data(RedsState *reds, MainChannelClient *mcc, const void
 
 void reds_on_main_migrate_connected(RedsState *reds, int seamless)
 {
-    reds->src_do_seamless_migrate = seamless;
+    reds->src_do_seamless_migrate = !!seamless;
     if (reds->mig_wait_connect) {
         reds_mig_cleanup(reds);
     }
-- 
2.9.4



More information about the Spice-devel mailing list