diff options
author | kremlin <ian@kremlin.cc> | 2014-06-03 05:47:44 +0800 |
---|---|---|
committer | kremlin <ian@kremlin.cc> | 2014-06-03 05:47:44 +0800 |
commit | 6de394d4129d558807da8d52bc736494ccfbb387 (patch) | |
tree | d2dfabe2a33c418f6eb7d41444eb5df57b006a3f | |
parent | 80043b3695d542783fa08dc6c351276a104ff1f1 (diff) | |
download | systembsd-6de394d4129d558807da8d52bc736494ccfbb387.tar systembsd-6de394d4129d558807da8d52bc736494ccfbb387.tar.gz systembsd-6de394d4129d558807da8d52bc736494ccfbb387.tar.bz2 systembsd-6de394d4129d558807da8d52bc736494ccfbb387.tar.lz systembsd-6de394d4129d558807da8d52bc736494ccfbb387.tar.xz systembsd-6de394d4129d558807da8d52bc736494ccfbb387.tar.zst systembsd-6de394d4129d558807da8d52bc736494ccfbb387.zip |
minor, reference issue
-rw-r--r-- | src/interfaces/hostnamed/hostnamed.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/interfaces/hostnamed/hostnamed.c b/src/interfaces/hostnamed/hostnamed.c index 3f461e9..114ad10 100644 --- a/src/interfaces/hostnamed/hostnamed.c +++ b/src/interfaces/hostnamed/hostnamed.c @@ -103,14 +103,14 @@ static void on_name_lost(GDBusConnection *conn, } /* safe call to try and start hostnamed */ -GError hostnamed_init() { +GError * hostnamed_init() { guint bus_descriptor; GError *err = NULL; spect_data = g_dbus_node_info_new_for_xml(SYSTEMD_HOSTNAMED_XML, &err); - bus_descriptor = g_bus_own_name(G_BUS_TYPE_SESSION, + bus_descriptor = g_bus_own_name(G_BUS_TYPE_SYSTEM, (gchar *)"org.freedesktop.hostname1", G_BUS_NAME_OWNER_FLAGS_NONE, on_bus_acquired, @@ -121,4 +121,7 @@ GError hostnamed_init() { loop = g_main_loop_new(NULL, FALSE); g_main_loop_run(loop); + + //TODO: malloc and return reference as if a main() closed + return err; } |