[Spice-commits] server/red-channel.c server/red-channel.h

Frediano Ziglio fziglio at kemper.freedesktop.org
Mon Dec 14 06:07:58 PST 2015


 server/red-channel.c |    6 +++---
 server/red-channel.h |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 13b2c97e7904bc95ecb337768918f2e8ababa550
Author: Marc-André Lureau <mlureau at redhat.com>
Date:   Thu Dec 10 01:04:26 2015 +0100

    red-channel: constify some callback structs
    
    Because we can.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/server/red-channel.c b/server/red-channel.c
index ba906c6..1cc6534 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 2058350..c5784e6 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);


More information about the Spice-commits mailing list