summaryrefslogtreecommitdiffstats
path: root/src/watchdog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/watchdog.c')
-rw-r--r--src/watchdog.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/watchdog.c b/src/watchdog.c
index f9afd640..92144ba0 100644
--- a/src/watchdog.c
+++ b/src/watchdog.c
@@ -27,12 +27,15 @@
#include <systemd/sd-daemon.h>
#include "jobs.h"
+#include "systemd.h"
int watchdog_activate()
{
/* set the watchdog */
- if (sd_watchdog_enabled(0, NULL))
- sd_event_set_watchdog(jobs_get_sd_event(), 1);
+ if (sd_watchdog_enabled(0, NULL)) {
+ jobs_acquire_event_manager();
+ sd_event_set_watchdog(systemd_get_event_loop(), 1);
+ }
return 0;
}