Reorganize the setEventReceiver code

This commit is to re-organise the code to make the
setEventReceiver optional when GetTID gets called.

Currently, it is being called on every GetTID command.
This is and OEM behaviour, which was implemented at -
https://gerrit.openbmc.org/c/openbmc/pldm/+/41779/36

Also, setEventReceiver is a command defined in the platform
Spec, so rightfully placing it under the platform handler.

Signed-off-by: Sagar Srinivas <sagar.srinivas@ibm.com>
Change-Id: Ib60e9d46a8eaf4806c5ec2e9575f4e219bc80eab
diff --git a/pldmd/pldmd.cpp b/pldmd/pldmd.cpp
index c1ba345..fa68f17 100644
--- a/pldmd/pldmd.cpp
+++ b/pldmd/pldmd.cpp
@@ -269,9 +269,9 @@
     // handled. To enable building FRU table, the FRU handler is passed to the
     // Platform handler.
     auto platformHandler = std::make_unique<platform::Handler>(
-        &dbusHandler, PDR_JSONS_DIR, pdrRepo.get(), hostPDRHandler.get(),
-        dbusToPLDMEventHandler.get(), fruHandler.get(),
-        oemPlatformHandler.get(), event, true);
+        &dbusHandler, hostEID, &instanceIdDb, PDR_JSONS_DIR, pdrRepo.get(),
+        hostPDRHandler.get(), dbusToPLDMEventHandler.get(), fruHandler.get(),
+        oemPlatformHandler.get(), &reqHandler, event, true);
 #ifdef OEM_IBM
     pldm::responder::oem_ibm_platform::Handler* oemIbmPlatformHandler =
         dynamic_cast<pldm::responder::oem_ibm_platform::Handler*>(
@@ -281,10 +281,8 @@
 
     invoker.registerHandler(PLDM_BIOS, std::move(biosHandler));
     invoker.registerHandler(PLDM_PLATFORM, std::move(platformHandler));
-    invoker.registerHandler(
-        PLDM_BASE,
-        std::make_unique<base::Handler>(hostEID, instanceIdDb, event,
-                                        oemPlatformHandler.get(), &reqHandler));
+    invoker.registerHandler(PLDM_BASE, std::make_unique<base::Handler>(
+                                           event, oemPlatformHandler.get()));
     invoker.registerHandler(PLDM_FRU, std::move(fruHandler));
     dbus_api::Pdr dbusImplPdr(bus, "/xyz/openbmc_project/pldm", pdrRepo.get());
     sdbusplus::xyz::openbmc_project::PLDM::server::Event dbusImplEvent(