diff options
author | Ratan Gupta <ratagupt@in.ibm.com> | 2017-12-18 09:19:47 +0530 |
---|---|---|
committer | Ratan Gupta <ratagupt@in.ibm.com> | 2018-02-20 09:30:59 +0530 |
commit | c3dfe6176d17966daeb8a27e55b09f1fbb70fe56 (patch) | |
tree | a0f6bc2bce6b75c93adda8088ef55d5f3a2916a6 | |
parent | 40e0db468a22cb162d906391ea79ac757ab99d01 (diff) | |
download | phosphor-dbus-monitor-c3dfe6176d17966daeb8a27e55b09f1fbb70fe56.tar.gz phosphor-dbus-monitor-c3dfe6176d17966daeb8a27e55b09f1fbb70fe56.zip |
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 <ratagupt@in.ibm.com>
-rw-r--r-- | src/sdbusplus.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<sdbusplus::bus::match::match> 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 <typename ...Args> static void callMethodNoReply( |