oem-ibm: GetPDR allowed in BMC ready state
In case of reset reload, PLDM responds "PLDM stack not ready" to GetPDR
command util BMC reaches ready state. Any BMC state apart from "BMC
READY" should be considered as "PLDM stack not ready". Updated the
function to handle all the BMC states properly.
Change-Id: I5407d581be54cda83ae8f87a7240e2f3c27bdb1f
Signed-off-by: Archana Kakani <archana.kakani@ibm.com>
diff --git a/oem/ibm/libpldmresponder/oem_ibm_handler.cpp b/oem/ibm/libpldmresponder/oem_ibm_handler.cpp
index 9721bc1..decb953 100644
--- a/oem/ibm/libpldmresponder/oem_ibm_handler.cpp
+++ b/oem/ibm/libpldmresponder/oem_ibm_handler.cpp
@@ -773,8 +773,8 @@
pldm::utils::DBusHandler().getDbusPropertyVariant(
bmcPath.str.c_str(), "CurrentBMCState", BMC::interface);
- if (std::get<std::string>(propertyValue) ==
- "xyz.openbmc_project.State.BMC.BMCState.NotReady")
+ if (std::get<std::string>(propertyValue) !=
+ "xyz.openbmc_project.State.BMC.BMCState.Ready")
{
error("GetPDR : PLDM stack is not ready for PDR exchange");
return PLDM_ERROR_NOT_READY;