From 51694c22130d4f6160f63167a547d0a40763ef31 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Wed, 24 Apr 2019 01:44:44 -0700 Subject: message/payload: Clean up check / trailing state We want to be able to trivially re-use payloads for marshalling data from a buffer into other formats. This change tries to make the meaning of trailingOk and unpackCheck consistent, since the meanings didn't seem clear in the previous code. Now, unpackCheck is only used to determine if unpacking was checked, and trailingOk determines if unpackCheck is required. This also fixes lots of spurious warnings being printed for commands which were checking their output correctly, or were legacy and unable to check output. Change-Id: Id7aa9266693b4e3f896027acf6b3e5d757fdf981 Signed-off-by: William A. Kennington III --- include/ipmid/handler.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'include/ipmid/handler.hpp') diff --git a/include/ipmid/handler.hpp b/include/ipmid/handler.hpp index 1421c3d..ebeb442 100644 --- a/include/ipmid/handler.hpp +++ b/include/ipmid/handler.hpp @@ -153,6 +153,7 @@ class IpmiHandler final : public HandlerBase using ResultType = boost::callable_traits::return_type_t; UnpackArgsType unpackArgs; + request->payload.trailingOk = false; ipmi::Cc unpackError = request->unpack(unpackArgs); if (unpackError != ipmi::ccSuccess) { -- cgit v1.2.1