From 13b2c97e7904bc95ecb337768918f2e8ababa550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 10 Dec 2015 01:04:26 +0100 Subject: [PATCH] red-channel: constify some callback structs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because we can. Signed-off-by: Marc-André Lureau Acked-by: Frediano Ziglio --- 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 ba906c63..1cc65349 100644 --- a/server/red-channel.c +++ b/server/red-channel.c @@ -1012,7 +1012,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; @@ -1128,7 +1128,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, @@ -1157,7 +1157,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 2058350e..c5784e65 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);