Refactor the platform event message handler code

This commit makes slight code change to use some functions both
in BMC requester and responder flow.

Tested : Using pldmtool platformEventMessage is sent and D-Bus
property is verified.

Change-Id: Id433f136ad4c7be0d94817deed1d6b60df36b3e4
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
diff --git a/libpldmresponder/platform.cpp b/libpldmresponder/platform.cpp
index ecbc121..d2d1d6e 100644
--- a/libpldmresponder/platform.cpp
+++ b/libpldmresponder/platform.cpp
@@ -399,7 +399,8 @@
         const auto& [containerId, entityType, entityInstance] = entityInfo;
         events::StateSensorEntry stateSensorEntry{containerId, entityType,
                                                   entityInstance, sensorOffset};
-        return stateSensorHandler.eventAction(stateSensorEntry, eventState);
+        return hostPDRHandler->handleStateSensorEvent(stateSensorEntry,
+                                                      eventState);
     }
     else
     {