[glib] GDBusServer: move business logic from _new() function to initable_init()
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GDBusServer: move business logic from _new() function to initable_init()
- Date: Thu, 24 Mar 2011 14:09:14 +0000 (UTC)
commit a8bc1436f1106f92b9dad803787278323c2041fc
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Thu Mar 24 10:07:18 2011 -0400
GDBusServer: move business logic from _new() function to initable_init()
https://bugzilla.gnome.org/show_bug.cgi?id=639478
Signed-off-by: David Zeuthen <davidz redhat com>
gio/gdbusserver.c | 19 +++++++------------
1 files changed, 7 insertions(+), 12 deletions(-)
---
diff --git a/gio/gdbusserver.c b/gio/gdbusserver.c
index 299aca3..5bbeaae 100644
--- a/gio/gdbusserver.c
+++ b/gio/gdbusserver.c
@@ -494,15 +494,6 @@ g_dbus_server_new_sync (const gchar *address,
"guid", guid,
"authentication-observer", observer,
NULL);
- if (server != NULL)
- {
- /* Right now we don't have any transport not using the listener... */
- g_assert (server->is_using_listener);
- server->run_signal_handler_id = g_signal_connect (G_SOCKET_SERVICE (server->listener),
- "run",
- G_CALLBACK (on_run),
- server);
- }
return server;
}
@@ -1103,9 +1094,6 @@ initable_init (GInitable *initable,
}
}
- if (!ret)
- goto out;
-
out:
g_strfreev (addr_array);
@@ -1114,6 +1102,13 @@ initable_init (GInitable *initable,
{
if (last_error != NULL)
g_error_free (last_error);
+
+ /* Right now we don't have any transport not using the listener... */
+ g_assert (server->is_using_listener);
+ server->run_signal_handler_id = g_signal_connect (G_SOCKET_SERVICE (server->listener),
+ "run",
+ G_CALLBACK (on_run),
+ server);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]