implement async handlers for all requester commands
this commit makes use of 74f27c730ef3925a0f2a3adfaa04f8790f931372 to
convert the existing blocking requester commands in pldm to async
ones.
this is tested with Host code and seems to work fine
Change-Id: I8d4762c3cd5bce49f854b30f8325bfcd1dcb4ff9
Signed-off-by: Sampa Misra <sampmisr@in.ibm.com>
diff --git a/pldmd/pldmd.cpp b/pldmd/pldmd.cpp
index 4e3bea3..ca62bbd 100644
--- a/pldmd/pldmd.cpp
+++ b/pldmd/pldmd.cpp
@@ -193,14 +193,14 @@
{
hostPDRHandler = std::make_unique<HostPDRHandler>(
sockfd, hostEID, event, pdrRepo.get(), EVENTS_JSONS_DIR,
- entityTree.get(), bmcEntityTree.get(), dbusImplReq, reqHandler,
+ entityTree.get(), bmcEntityTree.get(), dbusImplReq, &reqHandler,
verbose);
hostEffecterParser =
std::make_unique<pldm::host_effecters::HostEffecterParser>(
&dbusImplReq, sockfd, pdrRepo.get(), dbusHandler.get(),
- HOST_JSONS_DIR, verbose);
- dbusToPLDMEventHandler =
- std::make_unique<DbusToPLDMEvent>(sockfd, hostEID, dbusImplReq);
+ HOST_JSONS_DIR, &reqHandler, verbose);
+ dbusToPLDMEventHandler = std::make_unique<DbusToPLDMEvent>(
+ sockfd, hostEID, dbusImplReq, &reqHandler);
}
std::unique_ptr<oem_platform::Handler> oemPlatformHandler{};
@@ -210,15 +210,16 @@
codeUpdate->clearDirPath(LID_STAGING_DIR);
oemPlatformHandler = std::make_unique<oem_ibm_platform::Handler>(
dbusHandler.get(), codeUpdate.get(), sockfd, hostEID, dbusImplReq,
- event);
+ event, &reqHandler);
codeUpdate->setOemPlatformHandler(oemPlatformHandler.get());
- invoker.registerHandler(
- PLDM_OEM, std::make_unique<oem_ibm::Handler>(
- oemPlatformHandler.get(), sockfd, hostEID, &dbusImplReq));
+ invoker.registerHandler(PLDM_OEM, std::make_unique<oem_ibm::Handler>(
+ oemPlatformHandler.get(), sockfd,
+ hostEID, &dbusImplReq, &reqHandler));
#endif
invoker.registerHandler(PLDM_BASE, std::make_unique<base::Handler>());
- invoker.registerHandler(PLDM_BIOS, std::make_unique<bios::Handler>(
- sockfd, hostEID, &dbusImplReq));
+ invoker.registerHandler(
+ PLDM_BIOS, std::make_unique<bios::Handler>(sockfd, hostEID,
+ &dbusImplReq, &reqHandler));
auto fruHandler = std::make_unique<fru::Handler>(
FRU_JSONS_DIR, pdrRepo.get(), entityTree.get(), bmcEntityTree.get());
// FRU table is built lazily when a FRU command or Get PDR command is