[PATCH phosphor-host-ipmid v2] Fix two issues in Issue #80

OpenBMC Patches openbmc-patches at stwcx.xyz
Thu Jun 30 21:10:38 AEST 2016


From: tomjose <tomjoseph at in.ibm.com>

Corrected the comment for the Get Channel Info command to
reflect the logic in the code. For issue two, corrected the
condition for returning the unspecifed error.

Fixes openbmc/phosphor-host-ipmid#80
---
 apphandler.C | 4 +++-
 ipmid.C      | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/apphandler.C b/apphandler.C
index d014f5b..b8cc0aa 100644
--- a/apphandler.C
+++ b/apphandler.C
@@ -445,7 +445,9 @@ ipmi_ret_t ipmi_app_channel_info(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
 
     printf("IPMI APP GET CHANNEL INFO\n");
 
-    // I"m only supporting channel 1.  0xE is the 'default channel'
+    // The supported channels numbers are 1 and 8.
+    // Channel Number E is used as way to identify the current channel
+    // that the command is being is received from.
     if (*p == 0xe || *p == 1 || *p == 8) {
 
         *data_len = sizeof(resp);
diff --git a/ipmid.C b/ipmid.C
index 7354958..374ede2 100644
--- a/ipmid.C
+++ b/ipmid.C
@@ -273,7 +273,7 @@ static int handle_ipmi_command(sd_bus_message *m, void *user_data, sd_bus_error
     {
         fprintf(stderr,"ERROR:[0x%X] handling NetFn:[0x%X], Cmd:[0x%X]\n",r, netfn, cmd);
 
-        if(r == -1) {
+        if(r < 0) {
            response[0] = IPMI_CC_UNSPECIFIED_ERROR;
         }
     }
-- 
2.9.0




More information about the openbmc mailing list