aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-api-dbus.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2019-02-14 09:37:26 +0100
committerJose Bollo <jose.bollo@iot.bzh>2019-03-27 10:48:40 +0100
commitc330ecf92fef81fdb0471715326b8bc6b4d52bc6 (patch)
treeb403a04b9035d326ff97f6b58f1a51e58014fe59 /src/afb-api-dbus.c
parentd7e4faba5d1744160d538edd74bc4bdd8a173b1a (diff)
system & jobs: Reverse link and acquiring events
- The new version of 'systemd_get_event_loop' dont depends anymore on jobs but returns a unique systemd event loop for any threads. - The event loop of jobs now use system.h function instead of the opposite. - The function 'jobs_get_sd_event' is removed - The function 'jobs_acquire_event_manager' is introduced. It is designed to that the current thread can manipulate the single event manager Change-Id: I31fe48dfe0f2cfa4d468e49338d36fea6e7e8081 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-api-dbus.c')
-rw-r--r--src/afb-api-dbus.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/afb-api-dbus.c b/src/afb-api-dbus.c
index 8c55ed01..dccfbbd8 100644
--- a/src/afb-api-dbus.c
+++ b/src/afb-api-dbus.c
@@ -45,6 +45,7 @@
#include "verbose.h"
#include "systemd.h"
+#include "jobs.h"
static const char DEFAULT_PATH_PREFIX[] = "/org/agl/afb/api/";
@@ -129,6 +130,7 @@ static struct api_dbus *make_api_dbus_3(int system, const char *path, size_t pat
}
/* choose the bus */
+ jobs_acquire_event_manager();
sdbus = (system ? systemd_get_system_bus : systemd_get_user_bus)();
if (sdbus == NULL)
goto error2;