[Spice-devel] [PATCH spice-server 1/2] reds: Inline reds_mig_switch function
Victor Toso
victortoso at redhat.com
Tue Sep 17 08:37:05 UTC 2019
On Wed, Sep 11, 2019 at 08:55:46AM +0100, Frediano Ziglio wrote:
> 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>
For series,
Acked-by: Victor Toso <victortoso 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
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190917/e6814d24/attachment.sig>
More information about the Spice-devel
mailing list