diff options
author | William A. Kennington III <wak@google.com> | 2018-04-27 14:31:08 -0700 |
---|---|---|
committer | Emily Shaffer <emilyshaffer@google.com> | 2018-05-22 18:22:06 +0000 |
commit | 4b017a9b8728d19880d8d0de9cb994d7c0273769 (patch) | |
tree | e28d5fcdc02cbb5b50a1343d81fa78d696d9052c /app/watchdog.cpp | |
parent | d541027d4bc1f7f0fa00411d5eead606d476dbc2 (diff) | |
download | phosphor-host-ipmid-4b017a9b8728d19880d8d0de9cb994d7c0273769.tar.gz phosphor-host-ipmid-4b017a9b8728d19880d8d0de9cb994d7c0273769.zip |
watchdog: Use ResetTimeRemaining for wd_reset
Using this helper method reduces the number of dbus calls made during
each watchdog reset.
Change-Id: I373db3babe03e05fca33eb4dbbbc7c07f95a39ea
Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'app/watchdog.cpp')
-rw-r--r-- | app/watchdog.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/watchdog.cpp b/app/watchdog.cpp index c1f25ac..dbd7426 100644 --- a/app/watchdog.cpp +++ b/app/watchdog.cpp @@ -40,12 +40,8 @@ ipmi_ret_t ipmi_app_watchdog_reset( return IPMI_WDOG_CC_NOT_INIT; } - // Reset the countdown to make sure we don't expire our timer - wd_service.setTimeRemaining(wd_prop.interval); - - // The spec states that the timer is activated by reset - wd_service.setEnabled(true); - + // The ipmi standard dictates we enable the watchdog during reset + wd_service.resetTimeRemaining(true); return IPMI_CC_OK; } catch (const InternalFailure& e) |