Make clear that these funcion are just checking a condition. Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> --- server/dcc.c | 2 +- server/display-channel.c | 4 ++-- server/red-channel.c | 8 ++++---- server/red-channel.h | 4 ++-- server/reds.c | 6 +++--- server/smartcard.c | 2 +- server/spicevmc.c | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/server/dcc.c b/server/dcc.c index 78452f4..e257b80 100644 --- a/server/dcc.c +++ b/server/dcc.c @@ -448,7 +448,7 @@ void dcc_start(DisplayChannelClient *dcc) red_channel_client_push_set_ack(RED_CHANNEL_CLIENT(dcc)); - if (red_channel_client_waits_for_migrate_data(rcc)) + if (red_channel_client_is_waiting_for_migrate_data(rcc)) return; if (!display_channel_client_wait_for_init(dcc)) diff --git a/server/display-channel.c b/server/display-channel.c index 32d87af..6683efd 100644 --- a/server/display-channel.c +++ b/server/display-channel.c @@ -1205,7 +1205,7 @@ int display_channel_wait_for_migrate_data(DisplayChannel *display) RedChannel *channel = &display->common.base; RedChannelClient *rcc; - if (!red_channel_waits_for_migrate_data(&display->common.base)) { + if (!red_channel_is_waiting_for_migrate_data(&display->common.base)) { return FALSE; } @@ -1220,7 +1220,7 @@ int display_channel_wait_for_migrate_data(DisplayChannel *display) break; } - if (!red_channel_client_waits_for_migrate_data(rcc)) { + if (!red_channel_client_is_waiting_for_migrate_data(rcc)) { return TRUE; } if (red_get_monotonic_time() > end_time) { diff --git a/server/red-channel.c b/server/red-channel.c index 2a64bc8..4b1d426 100644 --- a/server/red-channel.c +++ b/server/red-channel.c @@ -960,12 +960,12 @@ static void red_channel_client_seamless_migration_done(RedChannelClient *rcc) pthread_mutex_unlock(&rcc->client->lock); } -int red_channel_client_waits_for_migrate_data(RedChannelClient *rcc) +int red_channel_client_is_waiting_for_migrate_data(RedChannelClient *rcc) { return rcc->wait_migrate_data; } -int red_channel_waits_for_migrate_data(RedChannel *channel) +int red_channel_is_waiting_for_migrate_data(RedChannel *channel) { RedChannelClient *rcc; @@ -978,7 +978,7 @@ int red_channel_waits_for_migrate_data(RedChannel *channel) } spice_assert(channel->clients_num == 1); rcc = SPICE_CONTAINEROF(ring_get_head(&channel->clients), RedChannelClient, channel_link); - return red_channel_client_waits_for_migrate_data(rcc); + return red_channel_client_is_waiting_for_migrate_data(rcc); } static void red_channel_client_default_connect(RedChannel *channel, RedClient *client, @@ -1415,7 +1415,7 @@ static void red_channel_handle_migrate_data(RedChannelClient *rcc, uint32_t size if (!rcc->channel->channel_cbs.handle_migrate_data) { return; } - if (!red_channel_client_waits_for_migrate_data(rcc)) { + if (!red_channel_client_is_waiting_for_migrate_data(rcc)) { spice_channel_client_error(rcc, "unexpected"); return; } diff --git a/server/red-channel.h b/server/red-channel.h index 8369a94..8206cec 100644 --- a/server/red-channel.h +++ b/server/red-channel.h @@ -403,11 +403,11 @@ int red_channel_is_connected(RedChannel *channel); int red_channel_client_is_connected(RedChannelClient *rcc); void red_channel_client_default_migrate(RedChannelClient *rcc); -int red_channel_client_waits_for_migrate_data(RedChannelClient *rcc); +int red_channel_client_is_waiting_for_migrate_data(RedChannelClient *rcc); /* seamless migration is supported for only one client. This routine * checks if the only channel client associated with channel is * waiting for migration data */ -int red_channel_waits_for_migrate_data(RedChannel *channel); +int red_channel_is_waiting_for_migrate_data(RedChannel *channel); /* * the disconnect callback is called from the channel's thread, diff --git a/server/reds.c b/server/reds.c index f698042..68ad67c 100644 --- a/server/reds.c +++ b/server/reds.c @@ -590,7 +590,7 @@ static void reds_agent_remove(void) vdagent = NULL; reds_update_mouse_mode(); if (reds_main_channel_connected() && - !red_channel_waits_for_migrate_data(&reds->main_channel->base)) { + !red_channel_is_waiting_for_migrate_data(&reds->main_channel->base)) { main_channel_push_agent_disconnected(reds->main_channel); } } @@ -911,7 +911,7 @@ void reds_on_main_agent_start(MainChannelClient *mcc, uint32_t num_tokens) REDS_VDI_PORT_NUM_RECEIVE_BUFFS, REDS_AGENT_WINDOW_SIZE, num_tokens, - red_channel_client_waits_for_migrate_data(rcc)); + red_channel_client_is_waiting_for_migrate_data(rcc)); if (!client_added) { spice_warning("failed to add client to agent"); @@ -2940,7 +2940,7 @@ static SpiceCharDeviceState *attach_to_red_agent(SpiceCharDeviceInstance *sin) reds->agent_state.plug_generation++; if (reds->agent_state.mig_data || - red_channel_waits_for_migrate_data(&reds->main_channel->base)) { + red_channel_is_waiting_for_migrate_data(&reds->main_channel->base)) { /* Migration in progress (code is running on the destination host): * 1. Add the client to spice char device, if it was not already added. * 2.a If this (qemu-kvm state load side of migration) happens first diff --git a/server/smartcard.c b/server/smartcard.c index 39f1391..15ebcc9 100644 --- a/server/smartcard.c +++ b/server/smartcard.c @@ -356,7 +356,7 @@ static void smartcard_char_device_attach_client(SpiceCharDeviceInstance *char_de 0, /* send queue size */ ~0, ~0, - red_channel_client_waits_for_migrate_data( + red_channel_client_is_waiting_for_migrate_data( &scc->base)); if (!client_added) { spice_warning("failed"); diff --git a/server/spicevmc.c b/server/spicevmc.c index 23a81f0..e38863a 100644 --- a/server/spicevmc.c +++ b/server/spicevmc.c @@ -488,7 +488,7 @@ static void spicevmc_connect(RedChannel *channel, RedClient *client, } if (!spice_char_device_client_add(state->chardev_st, client, FALSE, 0, ~0, ~0, - red_channel_client_waits_for_migrate_data(rcc))) { + red_channel_client_is_waiting_for_migrate_data(rcc))) { spice_warning("failed to add client to spicevmc"); red_channel_client_disconnect(rcc); return; -- 2.4.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel