[PATCH phosphor-host-ipmid v2 03/20] Reset the lib path string per .so

OpenBMC Patches patches at stwcx.xyz
Wed Oct 21 23:48:04 AEDT 2015


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

---
 ipmid.C | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ipmid.C b/ipmid.C
index 3b136d0..d0dfba8 100644
--- a/ipmid.C
+++ b/ipmid.C
@@ -343,13 +343,14 @@ void ipmi_register_callback_handlers(const char* ipmi_lib_path)
         num_handlers = scandir(ipmi_lib_path, &handler_list, handler_select, alphasort);
         while(num_handlers--)
         {
-            printf("Registering handler:[%s]\n",handler_list[num_handlers]->d_name);
-
+            handler_fqdn = ipmi_lib_path;
             handler_fqdn += handler_list[num_handlers]->d_name;
+            printf("Registering handler:[%s]\n",handler_fqdn.c_str());
+
             lib_handler = dlopen(handler_fqdn.c_str(), RTLD_NOW);
             if(lib_handler == NULL)
             {
-                fprintf(stderr,"ERROR opening:[%s]\n",handler_list[num_handlers]->d_name);
+                fprintf(stderr,"ERROR opening:[%s]\n",handler_fqdn.c_str());
                 dlerror();
             }
             // Wipe the memory allocated for this particular entry.
-- 
2.6.0




More information about the openbmc mailing list