From c3dfe6176d17966daeb8a27e55b09f1fbb70fe56 Mon Sep 17 00:00:00 2001 From: Ratan Gupta Date: Mon, 18 Dec 2017 09:19:47 +0530 Subject: Change the access mode of the function getBus GetBus function provides the same instance of the bus application in the process. Now there is a need where we need the same bus instance at multiple places. Remove the friend loop, now it is not needed as we have changed the scope of getBus. Change-Id: I7e8cda45f3835b1d93be36f317741bc4ae6951a2 Signed-off-by: Ratan Gupta --- src/sdbusplus.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/sdbusplus.hpp') diff --git a/src/sdbusplus.hpp b/src/sdbusplus.hpp index d62a5d4..1a2c9c2 100644 --- a/src/sdbusplus.hpp +++ b/src/sdbusplus.hpp @@ -20,12 +20,6 @@ namespace monitoring class SDBusPlus { private: - static auto& getBus() - { - static auto bus = sdbusplus::bus::new_default(); - return bus; - } - static auto& getWatches() { static std::vector watches; @@ -33,6 +27,12 @@ class SDBusPlus } public: + static auto& getBus() + { + static auto bus = sdbusplus::bus::new_default(); + return bus; + } + /** @brief Invoke a method; ignore reply. */ template static void callMethodNoReply( -- cgit v1.2.1