summaryrefslogtreecommitdiffstats
path: root/ipmid-new.cpp
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@linux.intel.com>2019-03-13 08:54:12 -0700
committerVernon Mauery <vernon.mauery@linux.intel.com>2019-03-15 21:45:10 +0000
commitd35dcd02df2f3561e8961c24540e20f8c0f548f1 (patch)
tree2ac7ef1164ece37e84f4b7d5638d498fd2ca1224 /ipmid-new.cpp
parent5dcf41e994e6e568d056c973432a44ed5ffe66d0 (diff)
downloadphosphor-host-ipmid-d35dcd02df2f3561e8961c24540e20f8c0f548f1.tar.gz
phosphor-host-ipmid-d35dcd02df2f3561e8961c24540e20f8c0f548f1.zip
Use payload interface to unpack group/IANA from message
Directly calling unpack from the Request interface will attempt to unpack the whole message, resulting in a 0xC7 response if the whole message was not unpacked. Since at this point in the execution, the point is to only extract the group ID or the IANA, the lower-level Payload unpack interface must be used. This allows for partial unpacks and only returns error if there are not enough bytes to unpack. Change-Id: Ie18377597e925eff89c9b7c1a6d2258627d5f240 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Diffstat (limited to 'ipmid-new.cpp')
-rw-r--r--ipmid-new.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipmid-new.cpp b/ipmid-new.cpp
index 4986e49..b7c6205 100644
--- a/ipmid-new.cpp
+++ b/ipmid-new.cpp
@@ -286,7 +286,7 @@ message::Response::ptr executeIpmiGroupCommand(message::Request::ptr request)
{
// look up the group for this request
Group group;
- if (0 != request->unpack(group))
+ if (0 != request->payload.unpack(group))
{
return errorResponse(request, ccReqDataLenInvalid);
}
@@ -306,7 +306,7 @@ message::Response::ptr executeIpmiOemCommand(message::Request::ptr request)
{
// look up the iana for this request
Iana iana;
- if (0 != request->unpack(iana))
+ if (0 != request->payload.unpack(iana))
{
return errorResponse(request, ccReqDataLenInvalid);
}
OpenPOWER on IntegriCloud