Re: [PATCH spice 6/9] red-channel: constify some callback structs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> From: Marc-André Lureau <mlureau@xxxxxxxxxx>
> 
> Because we can.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
> ---
>  server/red-channel.c | 6 +++---
>  server/red-channel.h | 6 +++---
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/server/red-channel.c b/server/red-channel.c
> index 2a64bc8..ce4c691 100644
> --- a/server/red-channel.c
> +++ b/server/red-channel.c
> @@ -1014,7 +1014,7 @@ RedChannel *red_channel_create(int size,
>                                 uint32_t type, uint32_t id,
>                                 int handle_acks,
>                                 channel_handle_message_proc handle_message,
> -                               ChannelCbs *channel_cbs,
> +                               const ChannelCbs *channel_cbs,
>                                 uint32_t migration_flags)
>  {
>      RedChannel *channel;
> @@ -1130,7 +1130,7 @@ RedChannel *red_channel_create_parser(int size,
>                                 int handle_acks,
>                                 spice_parse_channel_func_t parser,
>                                 channel_handle_parsed_proc handle_parsed,
> -                               ChannelCbs *channel_cbs,
> +                               const ChannelCbs *channel_cbs,
>                                 uint32_t migration_flags)
>  {
>      RedChannel *channel = red_channel_create(size, core, type, id,
> @@ -1159,7 +1159,7 @@ void red_channel_set_stat_node(RedChannel *channel,
> StatNodeRef stat)
>  #endif
>  }
>  
> -void red_channel_register_client_cbs(RedChannel *channel, ClientCbs
> *client_cbs)
> +void red_channel_register_client_cbs(RedChannel *channel, const ClientCbs
> *client_cbs)
>  {
>      spice_assert(client_cbs->connect || channel->type ==
>      SPICE_CHANNEL_MAIN);
>      channel->client_cbs.connect = client_cbs->connect;
> diff --git a/server/red-channel.h b/server/red-channel.h
> index 8369a94..609bce3 100644
> --- a/server/red-channel.h
> +++ b/server/red-channel.h
> @@ -363,7 +363,7 @@ RedChannel *red_channel_create(int size,
>                                 uint32_t type, uint32_t id,
>                                 int handle_acks,
>                                 channel_handle_message_proc handle_message,
> -                               ChannelCbs *channel_cbs,
> +                               const ChannelCbs *channel_cbs,
>                                 uint32_t migration_flags);
>  
>  /* alternative constructor, meant for marshaller based (inputs,main)
>  channels,
> @@ -374,11 +374,11 @@ RedChannel *red_channel_create_parser(int size,
>                                 int handle_acks,
>                                 spice_parse_channel_func_t parser,
>                                 channel_handle_parsed_proc handle_parsed,
> -                               ChannelCbs *channel_cbs,
> +                               const ChannelCbs *channel_cbs,
>                                 uint32_t migration_flags);
>  void red_channel_set_stat_node(RedChannel *channel, StatNodeRef stat);
>  
> -void red_channel_register_client_cbs(RedChannel *channel, ClientCbs
> *client_cbs);
> +void red_channel_register_client_cbs(RedChannel *channel, const ClientCbs
> *client_cbs);
>  // caps are freed when the channel is destroyed
>  void red_channel_set_common_cap(RedChannel *channel, uint32_t cap);
>  void red_channel_set_cap(RedChannel *channel, uint32_t cap);
> --
> 2.5.0
> 

Acked-by: Frediano Ziglio <fziglio@xxxxxxxxxx>

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]