cpuinfoapp: Fix SdBusError exception in match rule
In the match rule looking for new interfaces on cpu objects, the first
thing pulled out of the message is an object_path, not a string. Trying
to read a string first throws an exception caused by
"sd_bus_message_read_basic string: System.Error.ENXIO"
Tested: Added my own interface to the cpu object from within cpuinfoapp
and confirmed that the exception is no longer thrown.
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
Change-Id: I72c226c10975159c8505f8da0cac9a7774ecb9e4
diff --git a/src/cpuinfo_main.cpp b/src/cpuinfo_main.cpp
index dc3a8e8..ffa603f 100644
--- a/src/cpuinfo_main.cpp
+++ b/src/cpuinfo_main.cpp
@@ -203,7 +203,7 @@
sdbusplus::bus::match::rules::interfacesAdded() +
sdbusplus::bus::match::rules::argNpath(0, objectPath.c_str()),
[&conn, cpu, propValues](sdbusplus::message::message& msg) {
- std::string objectName;
+ sdbusplus::message::object_path objectName;
boost::container::flat_map<
std::string,
boost::container::flat_map<std::string,