[Spice-devel] [PATCH spice-server 1/2] reds: Inline reds_mig_switch function
Frediano Ziglio
fziglio at redhat.com
Wed Sep 11 07:55:46 UTC 2019
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>
---
server/reds.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/server/reds.c b/server/reds.c
index c294137be..cd8e796aa 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;
}
--
2.21.0
More information about the Spice-devel
mailing list