Fix UnknownProperty error when getting sensor data record
Symptom:
When getting sensor data record by ipmitool sdr command,
there is error from dbus-monitor debug log as below:
method call time=1653875077.002911 sender=:1.56 -> destination=xyz.openbmc_project.Hwmon-3446998316.Hwmon1 serial=69975
string "xyz.openbmc_project.Sensor.Threshold.Warning"
string "WarningAlarmlow"
error time=1653875077.002975 sender=:1.52 -> destination=:1.56 error_name=org.freedesktop.DBus.Error.UnknownProperty re
string "Unknown interface xyz.openbmc_project.Sensor.Threshold.Warning or property WarningAlarmlow."
method return time=1653875077.003043 sender=:1.56 -> destination=:1.107 serial=69976 reply_serial=11
Root cause:
The property "WarningAlarmlow" name is case sensitive
Solution:
Correct the property name "WarningAlarmlow" to "WarningAlarmLow"
Verified:
Run ipmitool sdr command and check dbus-monitor debug log
Signed-off-by: Tim Lee <timlee660101@gmail.com>
Change-Id: Ic92b4849373756bf94a4960d803fae5269d5b8e9
diff --git a/sensordatahandler.hpp b/sensordatahandler.hpp
index add6178..54bd909 100644
--- a/sensordatahandler.hpp
+++ b/sensordatahandler.hpp
@@ -325,7 +325,7 @@
{
warningAlarmLow = std::get<bool>(ipmi::getDbusProperty(
bus, service, sensorInfo.sensorPath,
- "xyz.openbmc_project.Sensor.Threshold.Warning", "WarningAlarmlow"));
+ "xyz.openbmc_project.Sensor.Threshold.Warning", "WarningAlarmLow"));
}
catch (const std::exception& e)
{