static void __bt_core_terminate(void)
{
- if (main_loop)
+ if (main_loop) {
g_main_loop_quit(main_loop);
- else
+ } else {
+ BT_DBG("Terminating bt-core daemon");
exit(0);
+ }
}
static void __bt_core_set_status(bt_status_t status)
__bt_core_terminate();
}
-int main()
+int main(void)
{
DBusGConnection *conn = NULL;
GError *error = NULL;
DBusGProxy *dbus_proxy = NULL;
struct sigaction sa;
- BT_DBG("+");
+ BT_DBG("Starting bt-core daemeon");
g_type_init();
}
bt_core = g_object_new(BT_CORE_TYPE, NULL);
- if (bt_core == NULL) {
- BT_ERR("bt_service is NULL");
- goto fail;
- }
dbus_proxy = __bt_core_register(conn, bt_core);
if (!dbus_proxy) {
dbus_g_connection_unref(conn);
- BT_DBG("-");
+ BT_DBG("Terminating bt-core daemon");
return FALSE;
}