[PATCH phosphor-host-ipmid v2 2/3] Remove unused dbus call

OpenBMC Patches openbmc-patches at stwcx.xyz
Tue Mar 15 14:40:29 AEDT 2016


From: Cyril Bur <cyril.bur at au1.ibm.com>

It appears that the reply to org.openbmc.HostIpmi sendMessage dbus method is
unused. Remove it.

Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>
---
 ipmid.C | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/ipmid.C b/ipmid.C
index a42e2c1..a12ff10 100644
--- a/ipmid.C
+++ b/ipmid.C
@@ -176,9 +176,9 @@ ipmi_ret_t ipmi_netfn_router(ipmi_netfn_t netfn, ipmi_cmd_t cmd, ipmi_request_t
 
 static int send_ipmi_message(sd_bus_message *req, unsigned char seq, unsigned char netfn, unsigned char lun, unsigned char cmd, unsigned char cc, unsigned char *buf, unsigned char len) {
 
-    sd_bus_message *reply = NULL, *m=NULL;
+    sd_bus_message *m=NULL;
     const char *dest, *path;
-    int r, pty;
+    int r;
 
     dest = sd_bus_message_get_sender(req);
     path = sd_bus_message_get_path(req);
@@ -210,21 +210,15 @@ static int send_ipmi_message(sd_bus_message *req, unsigned char seq, unsigned ch
 
 
     // Call the IPMI responder on the bus so the message can be sent to the CEC
-    r = sd_bus_call(bus, m, 0, NULL, &reply);
+    r = sd_bus_call(bus, m, 0, NULL, NULL);
     if (r < 0) {
         fprintf(stderr, "Failed to call the method: %s\n", strerror(-r));
         fprintf(stderr, "Dest: %s, Path: %s\n", dest, path);
         goto final;
     }
 
-    r = sd_bus_message_read(reply, "x", &pty);
-    if (r < 0) {
-       fprintf(stderr, "Failed to get a rc from the method: %s\n", strerror(-r));
-    }
-
 final:
     sd_bus_message_unref(m);
-    sd_bus_message_unref(reply);
 
     return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
 }
-- 
2.7.1




More information about the openbmc mailing list