summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Joseph <tomjoseph@in.ibm.com>2017-04-28 01:27:17 +0530
committerTom Joseph <tomjoseph@in.ibm.com>2017-05-08 15:25:15 +0530
commit96b6d810648b1b6e38f0ff75f15ae9dc570a3698 (patch)
tree441481d0e8ed27268f3eb285d93d239fe2100e18
parent1967cf531ea25b3d0a09c6287f4c7c0cdc890478 (diff)
downloadphosphor-net-ipmid-96b6d810648b1b6e38f0ff75f15ae9dc570a3698.tar.gz
phosphor-net-ipmid-96b6d810648b1b6e38f0ff75f15ae9dc570a3698.zip
Allow SOL activation only if SOL is enabled.
Change-Id: Id5de2417b2cddd7711179c2516d5557983ace78e Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
-rw-r--r--command/payload_cmds.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/command/payload_cmds.cpp b/command/payload_cmds.cpp
index 1b69a33..2020722 100644
--- a/command/payload_cmds.cpp
+++ b/command/payload_cmds.cpp
@@ -31,6 +31,12 @@ std::vector<uint8_t> activatePayload(const std::vector<uint8_t>& inPayload,
return outPayload;
}
+ if (!std::get<sol::Manager&>(singletonPool).enable)
+ {
+ response->completionCode = IPMI_CC_PAYLOAD_TYPE_DISABLED;
+ return outPayload;
+ }
+
// Only one instance of SOL is currently supported.
if (request->payloadInstance != 1)
{
OpenPOWER on IntegriCloud