[PATCH ipmi-fru-parser] Fru write was growing the number of connections on dbus

OpenBMC Patches openbmc-patches at stwcx.xyz
Sat Nov 14 08:10:09 AEDT 2015


From: Chris Austen <austenc at us.ibm.com>

---
 writefrudata.C | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/writefrudata.C b/writefrudata.C
index 69bbb47..91aef45 100644
--- a/writefrudata.C
+++ b/writefrudata.C
@@ -91,19 +91,12 @@ int ipmi_update_inventory(const uint8_t fruid, const uint8_t *fru_data,
     sd_bus_error bus_error = SD_BUS_ERROR_NULL;
 
     // Gets a hook onto either a SYSTEM or SESSION bus
-    sd_bus *bus_type = NULL;
+    sd_bus *bus_type = ipmid_get_sd_bus_connection();
 
     // Req message contains the specifics about which method etc that we want to
     // access on which bus, object
     sd_bus_message *response = NULL;
 
-    rc = sd_bus_open_system(&bus_type);
-    if(rc < 0)
-    {
-        fprintf(stderr,"ERROR: Getting a SYSTEM bus hook\n");
-        return -1;
-    }
-
     // For each FRU area, extract the needed data , get it parsed and update
     // the Inventory.
     for(auto& iter : area_vec)
-- 
2.6.3




More information about the openbmc mailing list