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

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


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

diff --git a/server/reds-private.h b/server/reds-private.h
index 36800c2..be93dea 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -87,7 +87,7 @@ struct RedsState {
 
     int mig_wait_connect; /* src waits for clients to establish connection to dest
                              (before migration starts) */
-    int mig_wait_disconnect; /* src waits for clients to disconnect (after migration completes) */
+    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 f497352..2fddff6 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -431,7 +431,7 @@ static void reds_mig_cleanup(RedsState *reds)
         }
         reds->mig_inprogress = false;
         reds->mig_wait_connect = FALSE;
-        reds->mig_wait_disconnect = FALSE;
+        reds->mig_wait_disconnect = false;
         reds_core_timer_cancel(reds, reds->mig_timer);
         reds_mig_cleanup_wait_disconnect(reds);
     }
@@ -1746,7 +1746,7 @@ static void reds_handle_main_link(RedsState *reds, RedLinkInfo *link)
 
     reds->mig_inprogress = false;
     reds->mig_wait_connect = FALSE;
-    reds->mig_wait_disconnect = FALSE;
+    reds->mig_wait_disconnect = false;
 
     reds_info_new_channel(link, connection_id);
     stream = link->stream;
@@ -2943,14 +2943,14 @@ static void reds_mig_fill_wait_disconnect(RedsState *reds)
         reds->mig_wait_disconnect_clients = g_list_append(reds->mig_wait_disconnect_clients, client);
     }
     reds->mig_wait_connect = FALSE;
-    reds->mig_wait_disconnect = TRUE;
+    reds->mig_wait_disconnect = true;
     reds_core_timer_start(reds, reds->mig_timer, MIGRATE_TIMEOUT);
 }
 
 static void reds_mig_cleanup_wait_disconnect(RedsState *reds)
 {
     g_list_free(reds->mig_wait_disconnect_clients);
-    reds->mig_wait_disconnect = FALSE;
+    reds->mig_wait_disconnect = false;
 }
 
 static void reds_mig_remove_wait_disconnect_client(RedsState *reds, RedClient *client)
-- 
2.9.4



More information about the Spice-devel mailing list