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/libpldmresponder/test/libpldmresponder_pdr_sensor_test.cpp b/libpldmresponder/test/libpldmresponder_pdr_sensor_test.cpp
index a600c71..ae1ed3a 100644
--- a/libpldmresponder/test/libpldmresponder_pdr_sensor_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_pdr_sensor_test.cpp
@@ -34,8 +34,9 @@
     auto outPDRRepo = pldm_pdr_init();
     Repo outRepo(outPDRRepo);
     auto event = sdeventplus::Event::get_default();
-    Handler handler(&mockedUtils, "./pdr_jsons/state_sensor/good", inPDRRepo,
-                    nullptr, nullptr, nullptr, nullptr, event);
+    Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_sensor/good",
+                    inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
+                    event);
     handler.getPDR(req, requestPayloadLength);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, outRepo, PLDM_STATE_SENSOR_PDR);
@@ -85,8 +86,9 @@
     auto outPDRRepo = pldm_pdr_init();
     Repo outRepo(outPDRRepo);
     auto event = sdeventplus::Event::get_default();
-    Handler handler(&mockedUtils, "./pdr_jsons/state_sensor/good", inPDRRepo,
-                    nullptr, nullptr, nullptr, nullptr, event);
+    Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_sensor/good",
+                    inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
+                    event);
     handler.getPDR(req, requestPayloadLength);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, outRepo, PLDM_STATE_SENSOR_PDR);