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

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


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

diff --git a/server/reds-private.h b/server/reds-private.h
index be93dea..878a306 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -85,8 +85,8 @@ struct RedsState {
     MainChannel *main_channel;
     InputsChannel *inputs_channel;
 
-    int mig_wait_connect; /* src waits for clients to establish connection to dest
-                             (before migration starts) */
+    bool mig_wait_connect; /* src waits for clients to establish connection to dest
+                              (before migration starts) */
     bool mig_wait_disconnect; /* src waits for clients to disconnect (after migration completes) */
     GList *mig_wait_disconnect_clients;/* List of RedsMigWaitDisconnectClient. Holds the clients
                                          which the src waits for their disconnection */
diff --git a/server/reds.c b/server/reds.c
index 2fddff6..8182856 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -430,7 +430,7 @@ static void reds_mig_cleanup(RedsState *reds)
             }
         }
         reds->mig_inprogress = false;
-        reds->mig_wait_connect = FALSE;
+        reds->mig_wait_connect = false;
         reds->mig_wait_disconnect = false;
         reds_core_timer_cancel(reds, reds->mig_timer);
         reds_mig_cleanup_wait_disconnect(reds);
@@ -1745,7 +1745,7 @@ static void reds_handle_main_link(RedsState *reds, RedLinkInfo *link)
     }
 
     reds->mig_inprogress = false;
-    reds->mig_wait_connect = FALSE;
+    reds->mig_wait_connect = false;
     reds->mig_wait_disconnect = false;
 
     reds_info_new_channel(link, connection_id);
@@ -2927,7 +2927,7 @@ static void reds_mig_started(RedsState *reds)
     spice_assert(reds->config->mig_spice);
 
     reds->mig_inprogress = true;
-    reds->mig_wait_connect = TRUE;
+    reds->mig_wait_connect = true;
     reds_core_timer_start(reds, reds->mig_timer, MIGRATE_TIMEOUT);
 }
 
@@ -2942,7 +2942,7 @@ static void reds_mig_fill_wait_disconnect(RedsState *reds)
     GLIST_FOREACH(reds->clients, iter, RedClient, client) {
         reds->mig_wait_disconnect_clients = g_list_append(reds->mig_wait_disconnect_clients, client);
     }
-    reds->mig_wait_connect = FALSE;
+    reds->mig_wait_connect = false;
     reds->mig_wait_disconnect = true;
     reds_core_timer_start(reds, reds->mig_timer, MIGRATE_TIMEOUT);
 }
-- 
2.9.4



More information about the Spice-devel mailing list