[Spice-devel] [PATCH 09/26] server/red_channel: add red_channel_set_shut and use in inputs_channel

Marc-André Lureau marcandre.lureau at gmail.com
Mon Feb 14 17:40:52 PST 2011


ack,

I would suggest:

void red_channel_set_shut(RedChannel *channel, int shut);


On Fri, Feb 11, 2011 at 6:48 PM, Alon Levy <alevy at redhat.com> wrote:
> ---
>  server/inputs_channel.c |    2 +-
>  server/red_channel.c    |    5 +++++
>  server/red_channel.h    |    2 ++
>  3 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/server/inputs_channel.c b/server/inputs_channel.c
> index 8346e47..459f8f6 100644
> --- a/server/inputs_channel.c
> +++ b/server/inputs_channel.c
> @@ -459,7 +459,7 @@ static void inputs_shutdown(Channel *channel)
>
>     if (inputs_channel) {
>         red_channel_shutdown(&inputs_channel->base);
> -        inputs_channel->base.incoming.shut = TRUE;
> +        red_channel_set_shut(&inputs_channel->base);
>         channel->data = NULL;
>         g_inputs_channel = NULL;
>     }
> diff --git a/server/red_channel.c b/server/red_channel.c
> index a7405f7..2aa5f83 100644
> --- a/server/red_channel.c
> +++ b/server/red_channel.c
> @@ -699,3 +699,8 @@ void red_channel_ack_set_client_window(RedChannel *channel, int client_window)
>     channel->ack_data.client_window = client_window;
>  }
>
> +void red_channel_set_shut(RedChannel *channel)
> +{
> +    channel->incoming.shut = TRUE;
> +}
> +
> diff --git a/server/red_channel.h b/server/red_channel.h
> index 916c083..713056f 100644
> --- a/server/red_channel.h
> +++ b/server/red_channel.h
> @@ -248,6 +248,8 @@ void red_channel_ack_zero_messages_window(RedChannel *channel);
>  void red_channel_ack_set_client_window(RedChannel *channel, int client_window);
>  void red_channel_push_set_ack(RedChannel *channel);
>
> +void red_channel_set_shut(RedChannel *channel);
> +
>  // TODO: unstaticed for display/cursor channels. they do some specific pushes not through
>  // adding elements or on events. but not sure if this is actually required (only result
>  // should be that they ""try"" a little harder, but if the event system is correct it
> --
> 1.7.4
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>



-- 
Marc-André Lureau


More information about the Spice-devel mailing list