summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2014-11-28 17:29:12 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2014-11-28 18:25:36 +0100
commit4761d9591f62f65968303adb3a6f66586e0a29f7 (patch)
tree780995e35a6248f74e1552af4e05aadda3c60e06
parent946cea617584981215105dda6e5c02b36bb10042 (diff)
spice_channel_connect_clientwip/qxl-renames
-rw-r--r--server/red_channel.c14
-rw-r--r--server/red_channel.h4
-rw-r--r--server/reds.c14
3 files changed, 25 insertions, 7 deletions
diff --git a/server/red_channel.c b/server/red_channel.c
index b3b462e0..5d50459e 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -44,6 +44,8 @@
#include "main_dispatcher.h"
#include "red_time.h"
+#include <glib.h>
+
typedef struct EmptyMsgPipeItem {
PipeItem base;
int msg;
@@ -2433,3 +2435,15 @@ int red_channel_wait_all_sent(RedChannel *channel,
return TRUE;
}
}
+
+void red_channel_connect_client(RedChannel *channel, RedClient *client, RedsStream *stream,
+ int migration, int num_common_cap, const uint32_t *common_caps,
+ int num_caps, const uint32_t *caps)
+{
+ g_return_if_fail(channel != NULL);
+ g_return_if_fail(channel->client_cbs.connect != NULL);
+
+ channel->client_cbs.connect(channel, client, stream,
+ migration, num_common_cap, common_caps,
+ num_caps, caps);
+}
diff --git a/server/red_channel.h b/server/red_channel.h
index f531d3f5..b86fd1df 100644
--- a/server/red_channel.h
+++ b/server/red_channel.h
@@ -372,6 +372,10 @@ RedChannel *red_channel_create_parser(int size,
uint32_t migration_flags);
void red_channel_register_client_cbs(RedChannel *channel, ClientCbs *client_cbs);
+void red_channel_connect_client(RedChannel *channel, RedClient *client, RedsStream *stream,
+ int migration, int num_common_cap, const uint32_t *common_caps,
+ int num_caps, const uint32_t *caps);
+
// 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);
diff --git a/server/reds.c b/server/reds.c
index 43caea0d..bd5604c2 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1696,13 +1696,13 @@ static void reds_channel_do_link(RedChannel *channel, RedClient *client,
spice_assert(stream);
caps = red_link_mess_get_caps(link_msg);
- channel->client_cbs.connect(channel, client, stream,
- red_client_during_migrate_at_target(client),
- link_msg->num_common_caps,
- link_msg->num_common_caps ? caps : NULL,
- link_msg->num_channel_caps,
- link_msg->num_channel_caps ?
- caps + link_msg->num_common_caps : NULL);
+ red_channel_connect_client(channel, client, stream,
+ red_client_during_migrate_at_target(client),
+ link_msg->num_common_caps,
+ link_msg->num_common_caps ? caps : NULL,
+ link_msg->num_channel_caps,
+ link_msg->num_channel_caps ?
+ caps + link_msg->num_common_caps : NULL);
}
/*