Change the signature of the command handler functions.
Resolves openbmc/openbmc#857
Change-Id: I0b7ca6665dd89629838a238d77aff67fec1818c7
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/command/session_cmds.cpp b/command/session_cmds.cpp
index f30ef78..706cfcd 100644
--- a/command/session_cmds.cpp
+++ b/command/session_cmds.cpp
@@ -9,13 +9,14 @@
namespace command
{
-std::vector<uint8_t> setSessionPrivilegeLevel(std::vector<uint8_t>& inPayload,
- const message::Handler& handler)
+std::vector<uint8_t> setSessionPrivilegeLevel(
+ const std::vector<uint8_t>& inPayload, const message::Handler& handler)
{
std::cout << ">> setSessionPrivilegeLevel\n";
std::vector<uint8_t> outPayload(sizeof(SetSessionPrivLevelResp));
- auto request = reinterpret_cast<SetSessionPrivLevelReq*>(inPayload.data());
+ auto request = reinterpret_cast<const SetSessionPrivLevelReq*>
+ (inPayload.data());
auto response = reinterpret_cast<SetSessionPrivLevelResp*>
(outPayload.data());
response->completionCode = IPMI_CC_OK;
@@ -44,13 +45,14 @@
return outPayload;
}
-std::vector<uint8_t> closeSession(std::vector<uint8_t>& inPayload,
+std::vector<uint8_t> closeSession(const std::vector<uint8_t>& inPayload,
const message::Handler& handler)
{
std::cout << ">> closeSession\n";
std::vector<uint8_t> outPayload(sizeof(CloseSessionResponse));
- auto request = reinterpret_cast<CloseSessionRequest*>(inPayload.data());
+ auto request = reinterpret_cast<const CloseSessionRequest*>
+ (inPayload.data());
auto response = reinterpret_cast<CloseSessionResponse*>(outPayload.data());
response->completionCode = IPMI_CC_OK ;