[PATCH spice-server 2/6] Call parent constructor always at the beginning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Base object should be constructed first.
In this case there is not much change but better
to follow that style as all other constructors
do.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/red-channel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/red-channel.c b/server/red-channel.c
index 3b14fbf..8f9ae6c 100644
--- a/server/red-channel.c
+++ b/server/red-channel.c
@@ -226,6 +226,8 @@ red_channel_constructed(GObject *object)
 
     RedChannelClass *klass = RED_CHANNEL_GET_CLASS(self);
 
+    G_OBJECT_CLASS(red_channel_parent_class)->constructed(object);
+
     spice_assert(klass->config_socket && klass->on_disconnect &&
                  klass->alloc_recv_buf && klass->release_recv_buf);
     spice_assert(klass->handle_migrate_data ||
@@ -238,8 +240,6 @@ red_channel_constructed(GObject *object)
     self->priv->incoming_cb.handle_message = (handle_message_proc)klass->handle_message;
     self->priv->incoming_cb.handle_parsed = (handle_parsed_proc)klass->handle_parsed;
     self->priv->incoming_cb.parser = klass->parser;
-
-    G_OBJECT_CLASS(red_channel_parent_class)->constructed(object);
 }
 
 static void red_channel_client_default_connect(RedChannel *channel, RedClient *client,
-- 
2.7.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]