summaryrefslogtreecommitdiffstats
path: root/include/ipmid/message/unpack.hpp
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2019-04-24 01:44:44 -0700
committerWilliam A. Kennington III <wak@google.com>2019-04-29 12:06:35 -0700
commit51694c22130d4f6160f63167a547d0a40763ef31 (patch)
tree0cede79b38a3095efdacc49b69b66f80bef0a02a /include/ipmid/message/unpack.hpp
parentd6a2da07d5c90e21aaf7a1612314180db73bdb6b (diff)
downloadphosphor-host-ipmid-51694c22130d4f6160f63167a547d0a40763ef31.tar.gz
phosphor-host-ipmid-51694c22130d4f6160f63167a547d0a40763ef31.zip
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 <wak@google.com>
Diffstat (limited to 'include/ipmid/message/unpack.hpp')
-rw-r--r--include/ipmid/message/unpack.hpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/ipmid/message/unpack.hpp b/include/ipmid/message/unpack.hpp
index 94f80f1..fb2b066 100644
--- a/include/ipmid/message/unpack.hpp
+++ b/include/ipmid/message/unpack.hpp
@@ -324,13 +324,9 @@ struct UnpackSingle<Payload>
{
static int op(Payload& p, Payload& t)
{
+ t = p;
// mark that this payload is being included in the args
p.trailingOk = true;
- t = p;
- // reset the unpacking flags so it can be properly checked
- t.trailingOk = false;
- t.unpackCheck = true;
- t.unpackError = false;
return 0;
}
};
OpenPOWER on IntegriCloud