[Spice-commits] 2 commits - server/red-channel-client.c server/reds.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Sep 17 08:40:57 UTC 2019


 server/red-channel-client.c |    3 +--
 server/reds.c               |   17 ++++++-----------
 2 files changed, 7 insertions(+), 13 deletions(-)

New commits:
commit 6ccf0e48007c253195aae2aa2c8ea2af419430d6
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Sat Sep 7 18:34:31 2019 +0100

    red-channel-client: Inline red_channel_client_get_channel in macro
    
    Inline red_channel_client_get_channel in spice_channel_client_error
    macro.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Victor Toso <victortoso at redhat.com>

diff --git a/server/red-channel-client.c b/server/red-channel-client.c
index 337733d5..2fee76f5 100644
--- a/server/red-channel-client.c
+++ b/server/red-channel-client.c
@@ -178,8 +178,7 @@ static bool red_channel_client_config_socket(RedChannelClient *rcc);
  */
 #define spice_channel_client_error(rcc, format, ...)                                     \
     do {                                                                                 \
-        RedChannel *_ch = red_channel_client_get_channel(rcc);                           \
-        red_channel_warning(_ch, format, ## __VA_ARGS__);                                \
+        red_channel_warning(rcc->priv->channel, format, ## __VA_ARGS__);                 \
         red_channel_client_shutdown(rcc);                                                \
     } while (0)
 
commit 609398fb770c86640a0da6c7e3c1849ddf7e3827
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Sat Sep 7 09:08:15 2019 +0100

    reds: Inline reds_mig_switch function
    
    No much reason for not inlining it, it's quite small and do
    not reduce readability.
    Note that spice_server_migrate_switch is deprecated and not
    used by Qemu since commit 67be6726b6459472103ee87ceaf2e8e97c154965
    (cfr "spice: raise requirement to 0.12" September 2012).
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Victor Toso <victortoso at redhat.com>

diff --git a/server/reds.c b/server/reds.c
index c294137b..cd8e796a 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3148,16 +3148,6 @@ static void reds_mig_finished(RedsState *reds, int completed)
     reds_mig_release(reds->config);
 }
 
-static void reds_mig_switch(RedsState *reds)
-{
-    if (!reds->config->mig_spice) {
-        spice_warning("reds_mig_switch called without migrate_info set");
-        return;
-    }
-    main_channel_migrate_switch(reds->main_channel, reds->config->mig_spice);
-    reds_mig_release(reds->config);
-}
-
 static void migrate_timeout(void *opaque)
 {
     RedsState *reds = opaque;
@@ -4427,7 +4417,12 @@ SPICE_GNUC_VISIBLE int spice_server_migrate_switch(SpiceServer *reds)
        return 0;
     }
     reds->expect_migrate = FALSE;
-    reds_mig_switch(reds);
+    if (!reds->config->mig_spice) {
+        spice_warning("spice_server_migrate_switch called without migrate_info set");
+        return 0;
+    }
+    main_channel_migrate_switch(reds->main_channel, reds->config->mig_spice);
+    reds_mig_release(reds->config);
     return 0;
 }
 


More information about the Spice-commits mailing list