[Spice-commits] server/dummy-channel.c
Jonathon Jongsma
jjongsma at kemper.freedesktop.org
Tue Oct 25 21:24:20 UTC 2016
server/dummy-channel.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
New commits:
commit 35b7f4d5efec5cb7ed12e654dc74b19000f710c2
Author: Jonathon Jongsma <jjongsma at redhat.com>
Date: Tue Oct 25 12:11:31 2016 -0500
Implement vfuncs for DummyChannel
96e94c6f inadvertantly introduced a regression where an assert was
triggered in red_channel_constructed for DummyChannel since DummyChannel
didn't implement any of the expected RedChannel vfuncs. This patch
avoids the assert by assigning some empty vfuncs.
Acked-by: Pavel Grunt <pgrunt at redhat.com>
Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
diff --git a/server/dummy-channel.c b/server/dummy-channel.c
index 3b65bce..c43221b 100644
--- a/server/dummy-channel.c
+++ b/server/dummy-channel.c
@@ -7,9 +7,37 @@
G_DEFINE_TYPE(DummyChannel, dummy_channel, RED_TYPE_CHANNEL)
+static int dummy_config_socket(RedChannelClient *self)
+{
+ return 1;
+}
+
+static void dummy_on_disconnect(RedChannelClient *self)
+{
+}
+
+static uint8_t* dummy_alloc_recv_buf(RedChannelClient *self,
+ uint16_t type,
+ uint32_t size)
+{
+ return NULL;
+}
+
+static void dummy_release_recv_buf(RedChannelClient *self,
+ uint16_t type,
+ uint32_t size,
+ uint8_t *msg)
+{
+}
+
static void
dummy_channel_class_init(DummyChannelClass *klass)
{
+ RedChannelClass *channel_class = RED_CHANNEL_CLASS(klass);
+ channel_class->config_socket = dummy_config_socket;
+ channel_class->on_disconnect = dummy_on_disconnect;
+ channel_class->alloc_recv_buf = dummy_alloc_recv_buf;
+ channel_class->release_recv_buf = dummy_release_recv_buf;
}
static void
More information about the Spice-commits
mailing list