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

Submitted by Frediano Ziglio on June 16, 2017, 9:13 a.m.

Details

Message ID 20170616091334.31475-12-fziglio@redhat.com
State New
Headers show
Series "reds: Use bool for boolean types" ( rev: 6 5 4 3 2 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio June 16, 2017, 9:13 a.m.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 server/reds-private.h | 2 +-
 server/reds.c         | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

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)