summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@linux.intel.com>2018-11-08 15:29:56 -0800
committerVernon Mauery <vernon.mauery@linux.intel.com>2018-11-20 00:28:26 +0000
commit46590a3a955493e97fa83e040e9d1f9a0c6faa2c (patch)
tree6456584c1187f7b58d2952a0a5e651f4a1112d4a
parent5a6b63694fecdd0b4df40033f31e6c113380f3f1 (diff)
downloadphosphor-host-ipmid-46590a3a955493e97fa83e040e9d1f9a0c6faa2c.tar.gz
phosphor-host-ipmid-46590a3a955493e97fa83e040e9d1f9a0c6faa2c.zip
ipmid: 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: I0206a43eb2a8dd7c76b8246c9f9640a95b2e473c Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
-rw-r--r--ipmid.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipmid.cpp b/ipmid.cpp
index 2729cbb..1e7fd0d 100644
--- a/ipmid.cpp
+++ b/ipmid.cpp
@@ -627,7 +627,7 @@ int main(int argc, char* argv[])
}
/* Connect to system bus */
- r = sd_bus_open_system(&bus);
+ r = sd_bus_default_system(&bus);
if (r < 0)
{
log<level::ERR>("Failed to connect to system bus",
OpenPOWER on IntegriCloud