[Spice-devel] [PATCH spice-gtk 1/2] spice_session_migrate_end: set channel state before calling reset
Christophe Fergeau
cfergeau at redhat.com
Fri Sep 28 12:36:01 PDT 2012
On Thu, Sep 27, 2012 at 05:34:24PM +0200, Hans de Goede wrote:
> This way functions called from the channel_reset function can rely
> on state acurately reflecting the state. This is necessary to stop
accurately
ACK
> channel-usbredir's reset callback from trying to send the initial
> hello message while switch-host / semi-seamless migration is still
> in progress.
>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
> gtk/spice-session.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/gtk/spice-session.c b/gtk/spice-session.c
> index 68d1594..28ebe8a 100644
> --- a/gtk/spice-session.c
> +++ b/gtk/spice-session.c
> @@ -1388,15 +1388,17 @@ void spice_session_migrate_end(SpiceSession *self)
> SpiceChannel *channel = l->data;
> l = l->next;
>
> + if (!SPICE_IS_MAIN_CHANNEL(channel)) {
> + /* freeze other channels */
> + channel->priv->state = SPICE_CHANNEL_STATE_MIGRATING;
> + }
> +
> /* reset for migration, disconnect */
> spice_channel_reset(channel, TRUE);
>
> if (SPICE_IS_MAIN_CHANNEL(channel)) {
> /* migrate main to target, so we can start talking */
> spice_session_channel_migrate(self, channel);
> - } else {
> - /* freeze other channels */
> - channel->priv->state = SPICE_CHANNEL_STATE_MIGRATING;
> }
> }
>
> --
> 1.7.12
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120928/dc92b742/attachment.pgp>
More information about the Spice-devel
mailing list