summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@linux.intel.com>2018-11-08 16:54:23 -0800
committerVernon Mauery <vernon.mauery@linux.intel.com>2018-11-09 08:37:04 -0800
commit96a1a391bd12bd9fd9a72aab46b4492805a5e852 (patch)
tree9bf7f696b7554a2f324ef92a4a049262488e726d
parent6b4faac06798123b8f82544011a814ca351390fa (diff)
downloadphosphor-net-ipmid-96a1a391bd12bd9fd9a72aab46b4492805a5e852.tar.gz
phosphor-net-ipmid-96a1a391bd12bd9fd9a72aab46b4492805a5e852.zip
netipmid: use the default system bus
The documentation says sd_bus_default_system() is preferred over sd_bus_open_system() because all the calls to sd_bus_default_system() will use the same resources, whereas the sd_bus_open_system() will create a new connection and consume more resources for every call. Change-Id: Ifc6a62cf9d35df3615d1133ef5c8f115ff462d98 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
-rw-r--r--main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index 847c991..9f61104 100644
--- a/main.cpp
+++ b/main.cpp
@@ -98,7 +98,7 @@ int main(int i_argc, char* i_argv[])
ipmidbus = fopen("/dev/null", "w");
// Connect to system bus
- auto rc = sd_bus_open_system(&bus);
+ auto rc = sd_bus_default_system(&bus);
if (rc < 0)
{
std::cerr << "Failed to connect to system bus:" << strerror(-rc)
OpenPOWER on IntegriCloud