ensure deleted object is entry
Some code is coming that puts a new D-Bus object on the
/xyz/openbmc_project/logging/ path. The addCallback() interface
correctly verified the path was an entry but the delCallBack() path did
not.
Tested:
Verified with this change that phosphor-dump-manager no longer core
dumps when one of these new objects is deleted.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Ie702e52b97bc484a44543719e10eab573f8ecb73
diff --git a/elog_watch.cpp b/elog_watch.cpp
index 0a7789c..5dabdb9 100644
--- a/elog_watch.cpp
+++ b/elog_watch.cpp
@@ -168,6 +168,13 @@
return;
}
+ std::size_t found = objectPath.str.find("entry");
+ if (found == std::string::npos)
+ {
+ // Not a error entry so skip
+ return;
+ }
+
// Get elog id
auto eId = getEid(objectPath);