From d35dcd02df2f3561e8961c24540e20f8c0f548f1 Mon Sep 17 00:00:00 2001 From: Vernon Mauery Date: Wed, 13 Mar 2019 08:54:12 -0700 Subject: 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 --- ipmid-new.cpp | 4 ++-- 1 file 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); } -- cgit v1.2.1