From 96a1a391bd12bd9fd9a72aab46b4492805a5e852 Mon Sep 17 00:00:00 2001 From: Vernon Mauery Date: Thu, 8 Nov 2018 16:54:23 -0800 Subject: 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 --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.1