[Spice-devel] [PATCH 13/15] Change red_on_main_agent_data() to take RedsState arg
Pavel Grunt
pgrunt at redhat.com
Tue Jan 19 01:00:43 PST 2016
Also changes reds_on_main_agent_monitors_config() to take RedsState
Reviewed-by: Pavel Grunt <pgrunt at redhat.com>
On Mon, 2016-01-18 at 16:38 +0000, Frediano Ziglio wrote:
> From: Jonathon Jongsma <jjongsma at redhat.com>
>
> ---
> server/main-channel.c | 2 +-
> server/reds.c | 6 +++---
> server/reds.h | 2 +-
> 3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/server/main-channel.c b/server/main-channel.c
> index 3315d6c..a30ba1e 100644
> --- a/server/main-channel.c
> +++ b/server/main-channel.c
> @@ -895,7 +895,7 @@ static int
> main_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, uint
> break;
> }
> case SPICE_MSGC_MAIN_AGENT_DATA: {
> - reds_on_main_agent_data(mcc, message, size);
> + reds_on_main_agent_data(reds, mcc, message, size);
> break;
> }
> case SPICE_MSGC_MAIN_AGENT_TOKEN: {
> diff --git a/server/reds.c b/server/reds.c
> index 5c038ca..37d0393 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -1050,7 +1050,7 @@ static void
> reds_client_monitors_config_cleanup(RedsState *reds)
> cmc->mcc = NULL;
> }
>
> -static void reds_on_main_agent_monitors_config(
> +static void reds_on_main_agent_monitors_config(RedsState *reds,
> MainChannelClient *mcc, void *message, size_t size)
> {
> VDAgentMessage *msg_header;
> @@ -1075,7 +1075,7 @@ static void reds_on_main_agent_monitors_config(
> reds_client_monitors_config_cleanup(reds);
> }
>
> -void reds_on_main_agent_data(MainChannelClient *mcc, void *message,
> size_t size)
> +void reds_on_main_agent_data(RedsState *reds, MainChannelClient
> *mcc, void *message, size_t size)
> {
> VDIPortState *dev_state = &reds->agent_state;
> VDIChunkHeader *header;
> @@ -1089,7 +1089,7 @@ void reds_on_main_agent_data(MainChannelClient
> *mcc, void *message, size_t size)
> case AGENT_MSG_FILTER_DISCARD:
> return;
> case AGENT_MSG_FILTER_MONITORS_CONFIG:
> - reds_on_main_agent_monitors_config(mcc, message, size);
> + reds_on_main_agent_monitors_config(reds, mcc, message,
> size);
> return;
> case AGENT_MSG_FILTER_PROTO_ERROR:
> red_channel_client_shutdown(main_channel_client_get_base(mcc
> ));
> diff --git a/server/reds.h b/server/reds.h
> index 0294333..9672c5e 100644
> --- a/server/reds.h
> +++ b/server/reds.h
> @@ -98,7 +98,7 @@ void reds_on_main_agent_start(RedsState *reds,
> MainChannelClient *mcc, uint32_t
> void reds_on_main_agent_tokens(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(MainChannelClient *mcc, void *message,
> size_t size);
> +void reds_on_main_agent_data(RedsState *reds, MainChannelClient
> *mcc, void *message, size_t size);
> void reds_on_main_migrate_connected(int seamless); //should be
> called when all the clients
> // are connected
> to the target
> int reds_handle_migrate_data(MainChannelClient *mcc,
More information about the Spice-devel
mailing list