[Spice-commits] server/reds.c server/reds.h

Pavel Grunt pgrunt at kemper.freedesktop.org
Fri Jun 2 09:21:58 UTC 2017


 server/reds.c |    5 +++--
 server/reds.h |    3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 5dc55aa70dbf1b4cbf87aa9d5783f4b7cb7c8115
Author: Pavel Grunt <pgrunt at redhat.com>
Date:   Thu Jun 1 15:40:47 2017 +0200

    reds: Constantify agent message parameter
    
    Make clear that the function is not changing it
    
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/server/reds.c b/server/reds.c
index 5bbbaa7a..bafd04ba 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1088,7 +1088,7 @@ static void reds_client_monitors_config_cleanup(RedsState *reds)
 }
 
 static void reds_on_main_agent_monitors_config(RedsState *reds,
-        MainChannelClient *mcc, void *message, size_t size)
+        MainChannelClient *mcc, const void *message, size_t size)
 {
     VDAgentMessage *msg_header;
     VDAgentMonitorsConfig *monitors_config;
@@ -1111,7 +1111,8 @@ static void reds_on_main_agent_monitors_config(RedsState *reds,
     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 e5f70d57..bbd33b09 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,


More information about the Spice-commits mailing list