bmc: use latest sdbusplus match APIs
Change-Id: I02aca5f8c7e633c6de7608194a0bdb0874ef2090
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/bmc_state_manager.cpp b/bmc_state_manager.cpp
index 4559c80..9929059 100644
--- a/bmc_state_manager.cpp
+++ b/bmc_state_manager.cpp
@@ -130,23 +130,15 @@
return;
}
-int BMC::bmcStateChangeSignal(sd_bus_message *msg, void *userData,
- sd_bus_error *retError)
-{
- return static_cast<BMC*>(userData)->bmcStateChange(msg, retError);
-}
-
-int BMC::bmcStateChange(sd_bus_message *msg,
- sd_bus_error *retError)
+int BMC::bmcStateChange(sdbusplus::message::message& msg)
{
uint32_t newStateID {};
sdbusplus::message::object_path newStateObjPath;
std::string newStateUnit{};
std::string newStateResult{};
- auto sdPlusMsg = sdbusplus::message::message(msg);
//Read the msg and populate each variable
- sdPlusMsg.read(newStateID, newStateObjPath, newStateUnit, newStateResult);
+ msg.read(newStateID, newStateObjPath, newStateUnit, newStateResult);
//Caught the signal that indicates the BMC is now BMC_READY
if((newStateUnit == obmcStandbyTarget) &&