Re: [PATCH spice 2/3] reds: Constantify agent message parameter

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

 



> 
> Make clear that the function is not changing it
> ---
>  server/reds.c | 5 +++--
>  server/reds.h | 3 ++-
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/server/reds.c b/server/reds.c
> index 35d430494..8abeb3fbd 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -1087,7 +1087,7 @@ static void
> reds_client_monitors_config_cleanup(RedsState *reds)
>      cmc->buffer = NULL;
>  }
>  
> -static void reds_on_main_agent_monitors_config(RedsState *reds, void
> *message, size_t size)
> +static void reds_on_main_agent_monitors_config(RedsState *reds, const void
> *message, size_t size)
>  {
>      VDAgentMessage *msg_header;
>      VDAgentMonitorsConfig *monitors_config;
> @@ -1110,7 +1110,8 @@ static void
> reds_on_main_agent_monitors_config(RedsState *reds, void *message, s
>      reds_client_monitors_config_cleanup(reds);
>  }
>  
> -void reds_on_main_agent_data(RedsState *reds, MainChannelClient *mcc, void
> *message, size_t size)
> +void reds_on_main_agent_data(RedsState *reds, MainChannelClient *mcc, const
> void *message,
> +                             size_t size)
>  {
>      RedCharDeviceVDIPort *dev = reds->agent_dev;
>      VDIChunkHeader *header;
> diff --git a/server/reds.h b/server/reds.h
> index e5f70d571..bbd33b098 100644
> --- a/server/reds.h
> +++ b/server/reds.h
> @@ -79,7 +79,8 @@ void reds_on_main_agent_start(RedsState *reds,
> MainChannelClient *mcc, uint32_t
>  void reds_on_main_agent_tokens(RedsState *reds, MainChannelClient *mcc,
>  uint32_t num_tokens);
>  uint8_t *reds_get_agent_data_buffer(RedsState *reds, MainChannelClient *mcc,
>  size_t size);
>  void reds_release_agent_data_buffer(RedsState *reds, uint8_t *buf);
> -void reds_on_main_agent_data(RedsState *reds, MainChannelClient *mcc, void
> *message, size_t size);
> +void reds_on_main_agent_data(RedsState *reds, MainChannelClient *mcc, const
> void *message,
> +                             size_t size);
>  void reds_on_main_migrate_connected(RedsState *reds, int seamless); //should
>  be called when all the clients
>                                                     // are connected to the
>                                                     target
>  bool reds_handle_migrate_data(RedsState *recs, MainChannelClient *mcc,

Acked-by: Frediano Ziglio <fziglio@xxxxxxxxxx>

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://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]