[Spice-devel] [PATCH 03/11] Call dcc_send_item directly

Jonathon Jongsma jjongsma at redhat.com
Fri May 20 20:25:19 UTC 2016


Acked-by: Jonathon Jongsma <jjongsma at redhat.com>


On Fri, 2016-05-20 at 14:01 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/dcc-send.c        | 4 ++--
>  server/dcc.h             | 2 +-
>  server/display-channel.c | 7 +------
>  3 files changed, 4 insertions(+), 9 deletions(-)
> 
> diff --git a/server/dcc-send.c b/server/dcc-send.c
> index 05da07f..8ec22c8 100644
> --- a/server/dcc-send.c
> +++ b/server/dcc-send.c
> @@ -2367,9 +2367,9 @@ static void reset_send_data(DisplayChannelClient *dcc)
>      memset(dcc->send_data.free_list.sync, 0, sizeof(dcc
> ->send_data.free_list.sync));
>  }
>  
> -void dcc_send_item(DisplayChannelClient *dcc, RedPipeItem *pipe_item)
> +void dcc_send_item(RedChannelClient *rcc, RedPipeItem *pipe_item)
>  {
> -    RedChannelClient *rcc = RED_CHANNEL_CLIENT(dcc);
> +    DisplayChannelClient *dcc = RCC_TO_DCC(rcc);
>      SpiceMarshaller *m = red_channel_client_get_marshaller(rcc);
>  
>      reset_send_data(dcc);
> diff --git a/server/dcc.h b/server/dcc.h
> index 864a768..a11d25a 100644
> --- a/server/dcc.h
> +++ b/server/dcc.h
> @@ -203,7 +203,7 @@ void                       dcc_append_drawable            
>            (DisplayCha
>  void                       dcc_add_drawable_after                   
>  (DisplayChannelClient *dcc,
>                                                                       
>  Drawable *drawable,
>                                                                       
>  RedPipeItem *pos);
> -void                       dcc_send_item                            
>  (DisplayChannelClient *dcc,
> +void                       dcc_send_item                            
>  (RedChannelClient *dcc,
>                                                                       
>  RedPipeItem *item);
>  int                        dcc_clear_surface_drawables_from_pipe    
>  (DisplayChannelClient *dcc,
>                                                                        int
> surface_id,
> diff --git a/server/display-channel.c b/server/display-channel.c
> index b9ed285..9f97911 100644
> --- a/server/display-channel.c
> +++ b/server/display-channel.c
> @@ -1925,11 +1925,6 @@ static void on_disconnect(RedChannelClient *rcc)
>                  display->glz_drawable_count);
>  }
>  
> -static void send_item(RedChannelClient *rcc, RedPipeItem *item)
> -{
> -    dcc_send_item(RCC_TO_DCC(rcc), item);
> -}
> -
>  static int handle_migrate_flush_mark(RedChannelClient *rcc)
>  {
>      DisplayChannel *display_channel = SPICE_CONTAINEROF(rcc->channel,
> DisplayChannel, common.base);
> @@ -1969,7 +1964,7 @@ DisplayChannel* display_channel_new(SpiceServer *reds,
> RedWorker *worker,
>      DisplayChannel *display;
>      ChannelCbs cbs = {
>          .on_disconnect = on_disconnect,
> -        .send_item = send_item,
> +        .send_item = dcc_send_item,
>          .handle_migrate_flush_mark = handle_migrate_flush_mark,
>          .handle_migrate_data = handle_migrate_data,
>          .handle_migrate_data_get_serial = handle_migrate_data_get_serial


More information about the Spice-devel mailing list