From 0044524d8972df79d9439e676f0f80a1006a2f23 Mon Sep 17 00:00:00 2001 From: Patrick Venture Date: Thu, 17 Aug 2017 12:40:03 -0700 Subject: 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 --- apphandler.cpp | 12 ++++++------ 1 file 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; } -- cgit v1.2.1