Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
CMake: Link with -latomic
[src/app-framework-binder.git]
/
src
/
watchdog.c
diff --git
a/src/watchdog.c
b/src/watchdog.c
index
f9afd64
..
efe291d
100644
(file)
--- a/
src/watchdog.c
+++ b/
src/watchdog.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 201
6-2019
"IoT.bzh"
+ * Copyright (C) 201
5-2020
"IoT.bzh"
* Author José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Author José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@
-27,12
+27,15
@@
#include <systemd/sd-daemon.h>
#include "jobs.h"
#include <systemd/sd-daemon.h>
#include "jobs.h"
+#include "systemd.h"
int watchdog_activate()
{
/* set the watchdog */
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;
}
return 0;
}