[Spice-devel] [spice-gtk PATCH 2/7] channel_main: handle SPICE_MSG_AGENT_CONNECTED_TOKENS
Yonit Halperin
yhalperi at redhat.com
Wed Aug 15 00:56:37 PDT 2012
---
gtk/channel-main.c | 12 ++++++++++++
spice-common | 2 +-
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index 0c15dfa..91c9167 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -163,6 +163,7 @@ static void spice_main_channel_reset_capabilties(SpiceChannel *channel)
{
spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_MAIN_CAP_SEMI_SEAMLESS_MIGRATE);
spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_MAIN_CAP_NAME_AND_UUID);
+ spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_MAIN_CAP_AGENT_CONNECTED_TOKENS);
}
static void spice_main_channel_init(SpiceMainChannel *channel)
@@ -1357,6 +1358,16 @@ static void main_handle_agent_connected(SpiceChannel *channel, SpiceMsgIn *in)
}
/* coroutine context */
+static void main_handle_agent_connected_tokens(SpiceChannel *channel, SpiceMsgIn *in)
+{
+ SpiceMainChannelPrivate *c = SPICE_MAIN_CHANNEL(channel)->priv;
+ SpiceMsgMainAgentConnectedTokens *msg = spice_msg_in_parsed(in);
+
+ c->agent_tokens = msg->num_tokens;
+ agent_start(SPICE_MAIN_CHANNEL(channel));
+}
+
+/* coroutine context */
static void main_handle_agent_disconnected(SpiceChannel *channel, SpiceMsgIn *in)
{
agent_stopped(SPICE_MAIN_CHANNEL(channel));
@@ -1837,6 +1848,7 @@ static const spice_msg_handler main_handlers[] = {
[ SPICE_MSG_MAIN_MIGRATE_END ] = main_handle_migrate_end,
[ SPICE_MSG_MAIN_MIGRATE_CANCEL ] = main_handle_migrate_cancel,
[ SPICE_MSG_MAIN_MIGRATE_SWITCH_HOST ] = main_handle_migrate_switch_host,
+ [ SPICE_MSG_MAIN_AGENT_CONNECTED_TOKENS ] = main_handle_agent_connected_tokens,
};
/* coroutine context */
diff --git a/spice-common b/spice-common
index c2adbb0..7439137 160000
--- a/spice-common
+++ b/spice-common
@@ -1 +1 @@
-Subproject commit c2adbb00dc0b29de0fe297f241fb0efeb4a81510
+Subproject commit 7439137509f838f95d672454cb9c30def7f84f89
--
1.7.7.6
More information about the Spice-devel
mailing list