Queue active sensor updates before status objs created
If an OCC Active sensor update comes in before the Status objects have
been created, the value is lost. This commit will save that sensor
value until the status objects are created.
Also, prevent querying the master sysfs file if OCCs are not yet activated.
Change-Id: I8c0d2686024278ec7435e19cf99f59802e1ecceb
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/pldm.cpp b/pldm.cpp
index 11119ab..6c2a291 100644
--- a/pldm.cpp
+++ b/pldm.cpp
@@ -488,8 +488,8 @@
}
catch (const sdbusplus::exception::exception& e)
{
- log<level::ERR>("pldm: GetInstanceId returned error",
- entry("ERROR=%s", e.what()));
+ log<level::ERR>(
+ fmt::format("pldm: GetInstanceId failed: {}", e.what()).c_str());
return false;
}
@@ -543,7 +543,7 @@
// start timer waiting for the response
using namespace std::literals::chrono_literals;
- pldmRspTimer.restartOnce(10s);
+ pldmRspTimer.restartOnce(8s);
// Wait for response/timeout
}