[Spice-devel] [PATCH spice-gtk v2 2/5] main channel: reseting channel caps

Yonit Halperin yhalperi at redhat.com
Thu May 17 05:25:35 PDT 2012


---
 gtk/channel-main.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index 6d5281e..fc6c97e 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -154,6 +154,12 @@ static const char *agent_caps[] = {
 
 /* ------------------------------------------------------------------ */
 
+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);
+}
+
 static void spice_main_channel_init(SpiceMainChannel *channel)
 {
     SpiceMainChannelPrivate *c;
@@ -161,8 +167,7 @@ static void spice_main_channel_init(SpiceMainChannel *channel)
     c = channel->priv = SPICE_MAIN_CHANNEL_GET_PRIVATE(channel);
     c->agent_msg_queue = g_queue_new();
 
-    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_main_channel_reset_capabilties(SPICE_CHANNEL(channel));
 }
 
 static void spice_main_get_property(GObject    *object,
@@ -309,6 +314,7 @@ static void spice_main_channel_class_init(SpiceMainChannelClass *klass)
     channel_class->handle_msg    = spice_main_handle_msg;
     channel_class->iterate_write = spice_channel_iterate_write;
     channel_class->channel_reset = spice_main_channel_reset;
+    channel_class->channel_reset_capabilities = spice_main_channel_reset_capabilties;
 
     /**
      * SpiceMainChannel:mouse-mode:
-- 
1.7.7.6



More information about the Spice-devel mailing list