X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwatchdog.c;h=efe291d9cc94caff412cf8ac435d28922af1f06d;hb=65353dce81a629e042800bb7b86fcd869a76727e;hp=f9afd640318ff82f5f5f614d7dc7fb935bd0705e;hpb=418ba126a955ee38804152c6c905ff200bbc1a92;p=src%2Fapp-framework-binder.git diff --git a/src/watchdog.c b/src/watchdog.c index f9afd640..efe291d9 100644 --- a/src/watchdog.c +++ b/src/watchdog.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2019 "IoT.bzh" + * Copyright (C) 2015-2020 "IoT.bzh" * Author José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,12 +27,15 @@ #include #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; }