Re: [PATCH spice-gtk v2 01/19] migration: add a few more pre-conditions in migration code

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

 



Hey,

On Fri, Nov 14, 2014 at 12:32:24AM +0100, Marc-André Lureau wrote:
> Those preconditions help to figure out several issues related to
> migration.


> ---
>  gtk/channel-main.c  | 2 ++
>  gtk/spice-channel.c | 3 +++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/gtk/channel-main.c b/gtk/channel-main.c
> index 1ad090f..62e8905 100644
> --- a/gtk/channel-main.c
> +++ b/gtk/channel-main.c
> @@ -2074,6 +2074,8 @@ static gboolean migrate_connect(gpointer data)
>      g_return_val_if_fail(c != NULL, FALSE);
>  
>      session = spice_channel_get_session(mig->src_channel);
> +    g_return_val_if_fail(session->priv->migration == NULL, FALSE);
> +
>      mig->session = spice_session_new_from_session(session);
>      mig->session->priv->migration_copy = true;
>  
> diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
> index 6c24bf5..fd52683 100644
> --- a/gtk/spice-channel.c
> +++ b/gtk/spice-channel.c
> @@ -2500,6 +2500,8 @@ gboolean spice_channel_connect(SpiceChannel *channel)
>      if (c->state >= SPICE_CHANNEL_STATE_CONNECTING)
>          return TRUE;
>  
> +    g_return_val_if_fail(channel->priv->fd == -1, FALSE);
> +

For the record, this part of te patch was changed since v1, which is
good as with v1, this check was triggered with virt-viewer -c
qemu+ssh://

Christophe

Attachment: pgpqDH5T1YeRv.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]