Remove creating sdbusplus handler in occ_finder
occ finder was creating a separate sdbusplus handler
to access the Inventory instead of using the one which
is already available. This commit will enforce using the
bus which is already created.
Change-Id: Ic256f185b67c661ba551139d5e057eee3ac67c7e
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/occ_finder.cpp b/occ_finder.cpp
index a533067..b47cc8f 100644
--- a/occ_finder.cpp
+++ b/occ_finder.cpp
@@ -23,7 +23,7 @@
return map[c];
}
-std::vector<std::string> get()
+std::vector<std::string> get(sdbusplus::bus::bus& bus)
{
namespace fs = std::experimental::filesystem;
using Path = std::string;
@@ -31,7 +31,6 @@
using Interface = std::string;
using Interfaces = std::vector<Interface>;
- auto bus = sdbusplus::bus::new_default();
auto mapper =
bus.new_method_call(
"xyz.openbmc_project.ObjectMapper",