From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> mainloop_notify takes care of sending the messages to NOTIFY_SOCKET and includes the handling of WATCHDOG_USEC as well. --- tools/btmon-logger.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/btmon-logger.c b/tools/btmon-logger.c index c3ba17939..1a42824ee 100644 --- a/tools/btmon-logger.c +++ b/tools/btmon-logger.c @@ -48,8 +48,6 @@ #include "src/shared/mainloop.h" #include "src/shared/btsnoop.h" -#include "src/systemd.h" - #define MONITOR_INDEX_NONE 0xffff struct monitor_hdr { @@ -283,7 +281,7 @@ int main(int argc, char *argv[]) mainloop_init(); - sd_notify(0, "STATUS=Starting up"); + mainloop_sd_notify("STATUS=Starting up"); while (true) { int opt; @@ -375,12 +373,12 @@ int main(int argc, char *argv[]) printf("Bluetooth monitor logger ver %s\n", VERSION); - sd_notify(0, "STATUS=Running"); - sd_notify(0, "READY=1"); + mainloop_sd_notify("STATUS=Running"); + mainloop_sd_notify("READY=1"); exit_status = mainloop_run(); - sd_notify(0, "STATUS=Quitting"); + mainloop_sd_notify("STATUS=Quitting"); btsnoop_unref(btsnoop_file); -- 2.17.2