summaryrefslogtreecommitdiffstats
path: root/app/watchdog_service.cpp
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2018-02-09 16:11:18 -0800
committerWilliam A. Kennington III <wak@google.com>2018-02-21 23:54:59 +0000
commitde14a027c06d93dadf05322529bec9d83f4cd181 (patch)
treea1d60808317a58d07c643889b8a4aa9c0572e4ef /app/watchdog_service.cpp
parent5257525db7dd97ffb8b5464df1b5b83df0297e7a (diff)
downloadphosphor-host-ipmid-de14a027c06d93dadf05322529bec9d83f4cd181.tar.gz
phosphor-host-ipmid-de14a027c06d93dadf05322529bec9d83f4cd181.zip
watchdog: Implement initialized using the new dbus interface
This makes it possible for the phosphor-host-ipmi or any other watchdog managing daemon to report to the caller that the watchdog was not configured if the phosphor-watchdog daemon restarts for any reason. Change-Id: Iae3a8554c2f5d1cb89368f3ce14b3d44922599c0 Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'app/watchdog_service.cpp')
-rw-r--r--app/watchdog_service.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/watchdog_service.cpp b/app/watchdog_service.cpp
index 7f5d179..36a967c 100644
--- a/app/watchdog_service.cpp
+++ b/app/watchdog_service.cpp
@@ -34,6 +34,7 @@ WatchdogService::Properties WatchdogService::getProperties()
std::map<std::string, variant<bool, uint64_t, std::string>> properties;
response.read(properties);
Properties wd_prop;
+ wd_prop.initialized = get<bool>(properties.at("Initialized"));
wd_prop.enabled = get<bool>(properties.at("Enabled"));
wd_prop.interval = get<uint64_t>(properties.at("Interval"));
wd_prop.timeRemaining = get<uint64_t>(properties.at("TimeRemaining"));
@@ -53,6 +54,11 @@ void WatchdogService::setProperty(const std::string& key, const T& val)
}
}
+void WatchdogService::setInitialized(bool initialized)
+{
+ setProperty("Initialized", initialized);
+}
+
void WatchdogService::setEnabled(bool enabled)
{
setProperty("Enabled", enabled);
OpenPOWER on IntegriCloud