Re: [PATCH spice-gtk 02/13] migration: abort migrate on disconnect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 09, 2014 at 05:31:34PM +0100, Marc-André Lureau wrote:
> If the session has an ongoing migration, but it is disconnected,
> abort it.

ACK

> ---
>  gtk/spice-session.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/gtk/spice-session.c b/gtk/spice-session.c
> index 88bcacd..3e3f16d 100644
> --- a/gtk/spice-session.c
> +++ b/gtk/spice-session.c
> @@ -1467,6 +1467,9 @@ void spice_session_abort_migration(SpiceSession *session)
>          return;
>      }
>  
> +    if (s->migration_state != SPICE_SESSION_MIGRATION_MIGRATING)
> +        goto end;
> +
>      for (ring = ring_get_head(&s->channels);
>           ring != NULL; ring = next) {
>          next = ring_next(&s->channels, ring);
> @@ -1482,6 +1485,7 @@ void spice_session_abort_migration(SpiceSession *session)
>                                           !s->full_migration);
>      }
>  
> +end:
>      g_list_free(s->migration_left);
>      s->migration_left = NULL;
>      spice_session_disconnect(s->migration);
> @@ -1652,6 +1656,7 @@ void spice_session_disconnect(SpiceSession *session)
>      s->name = NULL;
>      memset(s->uuid, 0, sizeof(s->uuid));
>  
> +    spice_session_abort_migration(session);
>      /* we leave disconnecting = TRUE, so that spice_channel_destroy()
>         is not called multiple times on channels that are in pending
>         destroy state. */
> -- 
> 1.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: pgptqidzvHQUx.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]