[Spice-commits] server/dcc.c server/display-channel.c server/red-channel.c server/red-channel.h server/reds.c server/smartcard.c server/spicevmc.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Thu Dec 10 09:23:22 PST 2015


 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(-)

New commits:
commit b12187b332123da383f52748e2865e0309d45d76
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Wed Dec 9 13:17:42 2015 +0000

    channel: rename red_channel_(client_)waits_* functions
    
    Make clear that these funcion are just checking a condition.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Jonathon Jongsma <jjongsma at redhat.com>

diff --git a/server/dcc.c b/server/dcc.c
index 5d55e5e..a893ea4 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 1f9a0ed..e3131e0 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -1191,7 +1191,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;
     }
 
@@ -1206,7 +1206,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 d890616..75a7d95 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -589,7 +589,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);
     }
 }
@@ -910,7 +910,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");
@@ -2939,7 +2939,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;


More information about the Spice-commits mailing list