summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@linux.intel.com>2019-03-08 13:48:40 -0800
committerVernon Mauery <vernon.mauery@linux.intel.com>2019-03-15 21:45:10 +0000
commitbfe55a1f7ca6388662cf9613d08ebb5266cd82f8 (patch)
tree1a3ddc08b41ef8019b4e9b2910cf766a719f10a7
parentd35dcd02df2f3561e8961c24540e20f8c0f548f1 (diff)
downloadphosphor-host-ipmid-bfe55a1f7ca6388662cf9613d08ebb5266cd82f8.zip
phosphor-host-ipmid-bfe55a1f7ca6388662cf9613d08ebb5266cd82f8.tar.gz
errorResponse must not pack completion code in data payload
Until the response goes back out onto D-Bus, the completion code is held in a separate part of the Response object. The D-Bus response has a separate field for the completion code as well, reserving a byte array for response data only. This fixes the ipmitool error message 'Bad response length, len=1' when it attempts to query the PICMG capabilities. Change-Id: Iff0c3cb2e46a20e52229265eebb0995878a41714 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
-rw-r--r--include/ipmid/handler.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/ipmid/handler.hpp b/include/ipmid/handler.hpp
index 0c65436..1643e58 100644
--- a/include/ipmid/handler.hpp
+++ b/include/ipmid/handler.hpp
@@ -42,15 +42,15 @@ static inline message::Response::ptr
errorResponse(message::Request::ptr request, ipmi::Cc cc, Args&&... args)
{
message::Response::ptr response = request->makeResponse();
- auto payload = std::make_tuple(cc, args...);
- response->pack(payload);
+ response->cc = cc;
+ response->pack(args...);
return response;
}
static inline message::Response::ptr
errorResponse(message::Request::ptr request, ipmi::Cc cc)
{
message::Response::ptr response = request->makeResponse();
- response->pack(cc);
+ response->cc = cc;
return response;
}
OpenPOWER on IntegriCloud