[Spice-devel] [PATCH spice-server v2 09/12] fixup! Move RedClient to a separate file

Pavel Grunt pgrunt at redhat.com
Tue Nov 1 14:28:18 UTC 2016


ACK

On Tue, 2016-11-01 at 11:08 +0000, Frediano Ziglio wrote:
> Style fixes
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/red-client.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/server/red-client.c b/server/red-client.c
> index 3984672..9b7d76e 100644
> --- a/server/red-client.c
> +++ b/server/red-client.c
> @@ -38,10 +38,11 @@ struct RedClient {
>      /* Note that while semi-seamless migration is conducted by the
> main thread, seamless migration
>       * involves all channels, and thus the related variables can be
> accessed from different
>       * threads */
> -    int during_target_migrate; /* if seamless=TRUE,
> migration_target is turned off when all
> -                                  the clients received their
> migration data. Otherwise (semi-seamless),
> -                                  it is turned off, when
> red_client_semi_seamless_migrate_complete
> -                                  is called */
> +    /* if seamless=TRUE, migration_target is turned off when all
> +     * the clients received their migration data. Otherwise (semi-
> seamless),
> +     * it is turned off, when
> red_client_semi_seamless_migrate_complete
> +     * is called */
> +    int during_target_migrate;
>      int seamless_migrate;
>      int num_migrated_channels; /* for seamless - number of channels
> that wait for migrate data*/
>      int refs;
> @@ -90,8 +91,9 @@ void red_client_set_migration_seamless(RedClient
> *client) // dest
>      /* update channel clients that got connected before the
> migration
>       * type was set. red_client_add_channel will handle newer
> channel clients */
>      FOREACH_CHANNEL_CLIENT(client, iter, rcc) {
> -        if (red_channel_client_set_migration_seamless(rcc))
> +        if (red_channel_client_set_migration_seamless(rcc)) {
>              client->num_migrated_channels++;
> +        }
>      }
>      pthread_mutex_unlock(&client->lock);
>  }
> @@ -194,8 +196,9 @@ gboolean red_client_add_channel(RedClient
> *client, RedChannelClient *rcc, GError
>  
>      client->channels = g_list_prepend(client->channels, rcc);
>      if (client->during_target_migrate && client->seamless_migrate)
> {
> -        if (red_channel_client_set_migration_seamless(rcc))
> +        if (red_channel_client_set_migration_seamless(rcc)) {
>              client->num_migrated_channels++;
> +        }
>      }
>  
>  cleanup:


More information about the Spice-devel mailing list