elog_watch: Fix parsing of elog add requests

Requests come in the form "oa{sa{sv}}". However, the way sdbusplus was
interpreting the type of our message "a{oa{sa{sv}}}" since tuples are
not allowed to consume multiple arguments during the read call as that
would be ambiguous. This fixes the type issues.

Prior to the change to sdbusplus that introduces error handling for the
read calls, the sd_bus_message_{enter,exit}_container were failing
during the read on the pair. Luckily this produces the expected result
for the read and our old code was "working".

This also cleans up an unnecessary string move.

Tested:
    Builds and no longer produces errors on zaius when elogs are added.

Change-Id: Ifc5394f3f361e8932c939376bd0bf5b4e3ca589c
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/elog_watch.cpp b/elog_watch.cpp
index e2a3866..6817f8b 100644
--- a/elog_watch.cpp
+++ b/elog_watch.cpp
@@ -28,7 +28,6 @@
 using AttributeMap = std::map<AttributeName, Attributes>;
 using PropertyName = std::string;
 using PropertyMap = std::map<PropertyName, AttributeMap>;
-using LogEntryMsg = std::pair<sdbusplus::message::object_path, PropertyMap>;
 
 Watch::Watch(sdbusplus::bus::bus& bus, IMgr& iMgr):
     iMgr(iMgr),
@@ -65,10 +64,11 @@
     using QuotaExceeded =
         sdbusplus::xyz::openbmc_project::Dump::Create::Error::QuotaExceeded;
 
-    LogEntryMsg logEntry;
+    sdbusplus::message::object_path objectPath;
+    PropertyMap propertyMap;
     try
     {
-        msg.read(logEntry);
+        msg.read(objectPath, propertyMap);
     }
     catch (const sdbusplus::exception::SdBusError& e)
     {
@@ -78,9 +78,7 @@
         return;
     }
 
-    std::string objectPath(std::move(logEntry.first));
-
-    std::size_t found = objectPath.find("entry");
+    std::size_t found = objectPath.str.find("entry");
     if (found == std::string::npos)
     {
         //Not a new error entry skip
@@ -96,8 +94,8 @@
         return;
     }
 
-    auto iter = logEntry.second.find("xyz.openbmc_project.Logging.Entry");
-    if (iter == logEntry.second.end())
+    auto iter = propertyMap.find("xyz.openbmc_project.Logging.Entry");
+    if (iter == propertyMap.end())
     {
         return;
     }
@@ -145,10 +143,10 @@
 
 void Watch::delCallback(sdbusplus::message::message& msg)
 {
-    sdbusplus::message::object_path logEntry;
+    sdbusplus::message::object_path objectPath;
     try
     {
-        msg.read(logEntry);
+        msg.read(objectPath);
     }
     catch (const sdbusplus::exception::SdBusError& e)
     {
@@ -158,9 +156,6 @@
         return;
     }
 
-    //Get elog entry message string.
-    std::string objectPath(logEntry);
-
     //Get elog id
     auto eId = getEid(objectPath);