[Spice-devel] [PATCH spice-server 07/22] reds: use bool for RedsState::dst_do_seamless_migrate
Frediano Ziglio
fziglio at redhat.com
Fri Jun 16 09:13:19 UTC 2017
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/reds-private.h | 4 ++--
server/reds.c | 8 ++++----
server/reds.h | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/server/reds-private.h b/server/reds-private.h
index 5cff9a4..37af888 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -96,8 +96,8 @@ struct RedsState {
int expect_migrate;
int src_do_seamless_migrate; /* per migration. Updated after the migration handshake
between the 2 servers */
- int dst_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;
GList *channels;
diff --git a/server/reds.c b/server/reds.c
index f97c48c..168b3d8 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1851,7 +1851,7 @@ static bool reds_link_mig_target_channels(RedsState *reds, RedClient *client)
mig_client = reds_mig_target_client_find(reds, client);
if (!mig_client) {
spice_debug("Error: mig target client was not found");
- return FALSE;
+ return false;
}
/* Each channel should check if we are during migration, and
@@ -1874,14 +1874,14 @@ static bool reds_link_mig_target_channels(RedsState *reds, RedClient *client)
reds_mig_target_client_free(reds, mig_client);
- return TRUE;
+ return true;
}
-int reds_on_migrate_dst_set_seamless(RedsState *reds, MainChannelClient *mcc, uint32_t src_version)
+bool reds_on_migrate_dst_set_seamless(RedsState *reds, MainChannelClient *mcc, uint32_t src_version)
{
/* seamless migration is not supported with multiple clients*/
if (reds->allow_multiple_clients || src_version > SPICE_MIGRATION_PROTOCOL_VERSION) {
- reds->dst_do_seamless_migrate = FALSE;
+ reds->dst_do_seamless_migrate = false;
} else {
RedChannelClient *rcc = RED_CHANNEL_CLIENT(mcc);
RedClient *client = red_channel_client_get_client(rcc);
diff --git a/server/reds.h b/server/reds.h
index bbd33b0..2fc50f8 100644
--- a/server/reds.h
+++ b/server/reds.h
@@ -88,7 +88,7 @@ bool reds_handle_migrate_data(RedsState *recs, MainChannelClient *mcc,
void reds_on_main_mouse_mode_request(RedsState *reds, void *message, size_t size);
/* migration dest side: returns whether it can support seamless migration
* with the given src migration protocol version */
-int reds_on_migrate_dst_set_seamless(RedsState *reds, MainChannelClient *mcc, uint32_t src_version);
+bool reds_on_migrate_dst_set_seamless(RedsState *reds, MainChannelClient *mcc, uint32_t src_version);
void reds_on_client_semi_seamless_migrate_complete(RedsState *reds, RedClient *client);
void reds_on_client_seamless_migrate_complete(RedsState *reds, RedClient *client);
void reds_on_main_channel_migrate(RedsState *reds, MainChannelClient *mcc);
--
2.9.4
More information about the Spice-devel
mailing list