summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Feist <james.feist@linux.intel.com>2019-03-25 23:03:51 +0300
committerJames Feist <james.feist@linux.intel.com>2019-04-03 21:23:15 +0300
commit61adbda37aa63ae77585797587a7b4b6c3b61b25 (patch)
tree6cdf206ba4cc9b9588df74dc8db1f54eef0ba7a7
parent4ed69245822e548763e7d4ba7bdb9f5cdba75c22 (diff)
downloadbmcweb-61adbda37aa63ae77585797587a7b4b6c3b61b25.tar.xz
pid: fix zone string length
Should be 8 based on comment. Tested: Updated patch script using latest zones and it worked. Example: /redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanZones/Left Change-Id: Ia56bc6ed4f02a05e91d3638c5b7f470f90d6eba4 Signed-off-by: James Feist <james.feist@linux.intel.com>
-rw-r--r--redfish-core/lib/managers.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index f9c2f38072..3cde0efe62 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -501,7 +501,11 @@ static bool getZonesFromJsonReq(const std::shared_ptr<AsyncResp>& response,
return false;
}
std::string input;
- if (!dbus::utility::getNthStringFromPath(path, 4, input))
+
+ // 8 below comes from
+ // /redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanZones/Left
+ // 0 1 2 3 4 5 6 7 8
+ if (!dbus::utility::getNthStringFromPath(path, 8, input))
{
BMCWEB_LOG_ERROR << "Got invalid path " << path;
BMCWEB_LOG_ERROR << "Illegal Type Zones";