diff options
Diffstat (limited to 'daemon/main.c')
-rw-r--r-- | daemon/main.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/daemon/main.c b/daemon/main.c index beec6482..43aafaa7 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -40,9 +40,10 @@ #include "notify.h" #include "logging.h" -#include "hcid.h" #include "sdpd.h" +#include "manager.h" + static GMainLoop *main_loop = NULL; static DBusConnection *system_bus = NULL; @@ -163,7 +164,14 @@ int main(int argc, char *argv[]) exit(1); } + if (manager_init(system_bus) < 0) { + dbus_connection_unref(system_bus); + g_main_loop_unref(main_loop); + exit(1); + } + if (start_sdp_server(0, SDP_SERVER_COMPAT) < 0) { + manager_exit(); dbus_connection_unref(system_bus); g_main_loop_unref(main_loop); exit(1); @@ -173,6 +181,8 @@ int main(int argc, char *argv[]) stop_sdp_server(); + manager_exit(); + dbus_connection_unref(system_bus); notify_remove(CONFIGDIR); |