Support `terminus_name` option in `dbus_to_terminus_effecter`
Support `terminus_name` configuration option in
`dbus_to_terminus_effecter` to allow setting the destination terminus
beside `mctp_eid`. This is helpful when the mctp endpoint Eid is not
static.
Change-Id: I8b1ed15741807086254146017c99c13ae667dac1
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
diff --git a/pldmd/pldmd.cpp b/pldmd/pldmd.cpp
index ad86afe..202f794 100644
--- a/pldmd/pldmd.cpp
+++ b/pldmd/pldmd.cpp
@@ -220,11 +220,16 @@
throw std::runtime_error("Failed to instantiate PDR repository");
}
DBusHandler dbusHandler;
+
+ std::unique_ptr<platform_mc::Manager> platformManager =
+ std::make_unique<platform_mc::Manager>(event, reqHandler, instanceIdDb);
+
std::unique_ptr<pldm::host_effecters::HostEffecterParser>
hostEffecterParser =
std::make_unique<pldm::host_effecters::HostEffecterParser>(
&instanceIdDb, pldmTransport.getEventSource(), pdrRepo.get(),
- &dbusHandler, HOST_JSONS_DIR, &reqHandler);
+ &dbusHandler, HOST_JSONS_DIR, &reqHandler,
+ platformManager.get());
#ifdef LIBPLDMRESPONDER
using namespace pldm::state_sensor;
dbus_api::Host dbusImplHost(bus, "/xyz/openbmc_project/pldm");
@@ -275,9 +280,6 @@
// handled. To enable building FRU table, the FRU handler is passed to the
// Platform handler.
- std::unique_ptr<platform_mc::Manager> platformManager =
- std::make_unique<platform_mc::Manager>(event, reqHandler, instanceIdDb);
-
pldm::responder::platform::EventMap addOnEventHandlers{
{PLDM_CPER_EVENT,
{[&platformManager](const pldm_msg* request, size_t payloadLength,