Use argos watchdog 64/234564/1
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 13 May 2020 02:58:08 +0000 (11:58 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Wed, 27 May 2020 06:47:15 +0000 (15:47 +0900)
Change-Id: Ibee53e1557cb241fab1f97c10b2951835a661359
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
CMakeLists.txt
packaging/deviced.spec
src/core/main.c

index 9bf6f79..d943f07 100644 (file)
@@ -184,6 +184,7 @@ SET(PKG_MODULES
        tizen-extension-client
        tizen-dpms-client
        zlib
+       argos_watchdog
 )
 
 IF(DISPLAY_MODULE STREQUAL on)
index 1792127..5fcb8eb 100644 (file)
@@ -41,6 +41,7 @@ BuildRequires:        pkgconfig(wayland-client)
 BuildRequires: pkgconfig(tizen-extension-client)
 BuildRequires: pkgconfig(tizen-dpms-client)
 BuildRequires: pkgconfig(zlib)
+BuildRequires: pkgconfig(argos_watchdog)
 
 Requires: %{name}-tools = %{version}-%{release}
 %{?systemd_requires}
index f8ac6b6..5338352 100644 (file)
@@ -25,6 +25,7 @@
 #include <libsyscommon/dbus-system.h>
 #include <libsyscommon/systemd-state.h>
 #include <device/booting-internal.h>
+#include <argos.h>
 
 #include "display/core.h"
 #include "log.h"
@@ -66,7 +67,9 @@ static void sig_usr1(int signo)
 
 void watchdog_notify(void)
 {
-       sd_notify(0, "WATCHDOG=1");
+       int ret = aw_notify();
+       if (ret < 0)
+               _E("Failed to aw_notifty: %d", ret);
 }
 
 static void deviced_dbus_name_acquired(GDBusConnection *connection, const gchar *name, gpointer user_data)