Fix missing to set WCTEMP to the threshold of config instance
The properties of the config instance would be set
to default in for loop of the Nvme::read function,
so it needs to set WCTEMP to the threshold properties
of the config instance in each polling loop
Signed-off-by: George Hung <george.hung@quantatw.com>
Change-Id: I1c5d073239ba2f24a8726afe88fe1cf37f819adc
diff --git a/nvme_manager.cpp b/nvme_manager.cpp
index e9e4328..e782864 100644
--- a/nvme_manager.cpp
+++ b/nvme_manager.cpp
@@ -560,6 +560,9 @@
iter->second->setSensorValueToDbus(nvmeData.sensorValue);
if (nvmeData.wcTemp != 0)
{
+ config.criticalHigh = nvmeData.wcTemp;
+ config.warningHigh = nvmeData.wcTemp;
+
iter->second->setSensorThreshold(
config.criticalHigh, config.criticalLow, config.warningHigh,
config.warningLow);