[Spice-devel] [PATCH 05/15] Change reds_agent_state_restore() to take RedsState arg

Frediano Ziglio fziglio at redhat.com
Wed Jan 20 05:15:29 PST 2016


> 
> From: Jonathon Jongsma <jjongsma at redhat.com>
> 
> ---
>  server/reds.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/server/reds.c b/server/reds.c
> index b3f853b..2959fe3 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -1261,7 +1261,7 @@ void reds_marshall_migrate_data(RedsState *reds,
> SpiceMarshaller *m)
>                   agent_state->write_filter.result);
>  }
>  
> -static int reds_agent_state_restore(SpiceMigrateDataMain *mig_data)
> +static int reds_agent_state_restore(RedsState *reds, SpiceMigrateDataMain
> *mig_data)
>  {
>      VDIPortState *agent_state = &reds->agent_state;
>      uint32_t chunk_header_remaining;
> @@ -1361,7 +1361,7 @@ int reds_handle_migrate_data(MainChannelClient *mcc,
> SpiceMigrateDataMain *mig_d
>                      main_channel_push_agent_connected(reds->main_channel);
>                  } else {
>                      spice_debug("restoring state from mig_data");
> -                    return reds_agent_state_restore(mig_data);
> +                    return reds_agent_state_restore(reds, mig_data);
>                  }
>              }
>          } else {
> @@ -3041,7 +3041,7 @@ static SpiceCharDeviceState
> *attach_to_red_agent(SpiceCharDeviceInstance *sin)
>          if (reds->agent_state.mig_data) {
>              spice_debug("restoring state from stored migration data");
>              spice_assert(reds->agent_state.plug_generation == 1);
> -            reds_agent_state_restore(reds->agent_state.mig_data);
> +            reds_agent_state_restore(reds, reds->agent_state.mig_data);
>              free(reds->agent_state.mig_data);
>              reds->agent_state.mig_data = NULL;
>          }

Acked-by: Frediano Ziglio <fziglio at redhat.com>

Frediano


More information about the Spice-devel mailing list