[Spice-devel] [PATCH 13/15] Change reds_client_disconnect() to take RedsState arg

Frediano Ziglio fziglio at redhat.com
Fri Jan 15 03:48:04 PST 2016


> 
> From: Jonathon Jongsma <jjongsma at redhat.com>
> 
> ---
>  server/main-dispatcher.c | 2 +-
>  server/reds.c            | 6 +++---
>  server/reds.h            | 2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/server/main-dispatcher.c b/server/main-dispatcher.c
> index 2cb53ef..db87e05 100644
> --- a/server/main-dispatcher.c
> +++ b/server/main-dispatcher.c
> @@ -136,7 +136,7 @@ static void main_dispatcher_handle_client_disconnect(void
> *opaque,
>      MainDispatcherClientDisconnectMessage *msg = payload;
>  
>      spice_debug("client=%p", msg->client);
> -    reds_client_disconnect(msg->client);
> +    reds_client_disconnect(reds, msg->client);
>      red_client_unref(msg->client);
>  }
>  
> diff --git a/server/reds.c b/server/reds.c
> index 28a8e2f..935819d 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -486,7 +486,7 @@ static int reds_main_channel_connected(RedsState *reds)
>      return main_channel_is_connected(reds->main_channel);
>  }
>  
> -void reds_client_disconnect(RedClient *client)
> +void reds_client_disconnect(RedsState *reds, RedClient *client)
>  {
>      RedsMigTargetClient *mig_client;
>  
> @@ -580,7 +580,7 @@ static void reds_disconnect(void)
>  
>      spice_info(NULL);
>      RING_FOREACH_SAFE(link, next, &reds->clients) {
> -        reds_client_disconnect(SPICE_CONTAINEROF(link, RedClient, link));
> +        reds_client_disconnect(reds, SPICE_CONTAINEROF(link, RedClient,
> link));
>      }
>      reds_mig_cleanup(reds);
>  }
> @@ -1613,7 +1613,7 @@ static void reds_mig_target_client_disconnect_all(void)
>  
>      RING_FOREACH_SAFE(now, next, &reds->mig_target_clients) {
>          RedsMigTargetClient *mig_client = SPICE_CONTAINEROF(now,
>          RedsMigTargetClient, link);
> -        reds_client_disconnect(mig_client->client);
> +        reds_client_disconnect(reds, mig_client->client);
>      }
>  }
>  
> diff --git a/server/reds.h b/server/reds.h
> index f5405ac..e38a99a 100644
> --- a/server/reds.h
> +++ b/server/reds.h
> @@ -81,7 +81,7 @@ extern spice_wan_compression_t zlib_glz_state;
>  // Temporary measures to make splitting reds.c to inputs-channel.c easier
>  
>  /* should be called only from main_dispatcher */
> -void reds_client_disconnect(RedClient *client);
> +void reds_client_disconnect(RedsState *reds, RedClient *client);
>  
>  // Temporary (?) for splitting main channel
>  typedef struct MainMigrateData MainMigrateData;

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

Frediano


More information about the Spice-devel mailing list