summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2017-08-17 12:40:03 -0700
committerPatrick Williams <patrick@stwcx.xyz>2017-09-12 16:38:57 +0000
commit0044524d8972df79d9439e676f0f80a1006a2f23 (patch)
tree7b23965670d267f6b390e788a0460e9890738ce9
parent18aae1f78ab1ee6783bf7f91a6b67b47e7845ac1 (diff)
downloadphosphor-host-ipmid-0044524d8972df79d9439e676f0f80a1006a2f23.tar.gz
phosphor-host-ipmid-0044524d8972df79d9439e676f0f80a1006a2f23.zip
Independently set the watchdog Interval when set
When we receive a set watchdog command, this will now set the Interval value directly. Change-Id: I34b82507cbad95f2ad56932d03a48a80b2dfc11d Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r--apphandler.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/apphandler.cpp b/apphandler.cpp
index d911356..210544c 100644
--- a/apphandler.cpp
+++ b/apphandler.cpp
@@ -436,22 +436,22 @@ ipmi_ret_t ipmi_app_set_watchdog(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
sd_bus_error_free(&error);
reply = sd_bus_message_unref(reply);
- // Now Enable Watchdog
+ // Set the Interval for the Watchdog
r = sd_bus_call_method(bus, busname, objname, property_iface,
"Set", &error, &reply, "ssv",
- iface, "Enabled", "b", true);
+ iface, "Interval", "t", timer_ms);
if(r < 0) {
- fprintf(stderr, "Failed to Enable Watchdog: %s\n",
+ fprintf(stderr, "Failed to set new expiration time: %s\n",
strerror(-r));
goto finish;
}
- // Set watchdog timer
+ // Now Enable Watchdog
r = sd_bus_call_method(bus, busname, objname, property_iface,
"Set", &error, &reply, "ssv",
- iface, "TimeRemaining", "t", timer_ms);
+ iface, "Enabled", "b", true);
if(r < 0) {
- fprintf(stderr, "Failed to set new expiration time: %s\n",
+ fprintf(stderr, "Failed to Enable Watchdog: %s\n",
strerror(-r));
goto finish;
}
OpenPOWER on IntegriCloud