diff options
author | Andrew Geissler <andrewg@us.ibm.com> | 2017-03-21 22:58:28 -0500 |
---|---|---|
committer | Andrew Geissler <andrewg@us.ibm.com> | 2017-05-09 12:50:39 -0500 |
commit | 1286637013b65a615e37d8677d75a1bba4c53e4b (patch) | |
tree | aae064436865ce2f3d4bb44c42e52e8449294694 /host-interface.cpp | |
parent | 1b9d4e5c676f5f2fd35583dc5e3459783a650578 (diff) | |
download | phosphor-host-ipmid-1286637013b65a615e37d8677d75a1bba4c53e4b.tar.gz phosphor-host-ipmid-1286637013b65a615e37d8677d75a1bba4c53e4b.zip |
Implement basic queue for sending multiple commands
Sends dbus signal upon completion of command
Change-Id: Ic507f35af0b38305eecd5558c55738f2d283aac5
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'host-interface.cpp')
-rw-r--r-- | host-interface.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/host-interface.cpp b/host-interface.cpp index f485516..aa32ff0 100644 --- a/host-interface.cpp +++ b/host-interface.cpp @@ -1,4 +1,3 @@ -#include <queue> #include <phosphor-logging/log.hpp> #include <utils.hpp> #include "host-interface.hpp" @@ -17,17 +16,15 @@ using namespace phosphor::logging; // When you see base:: you know we're referencing our base class namespace base = sdbusplus::xyz::openbmc_project::Control::server; -std::queue<base::Host::Command> workQueue{}; - void Host::execute(base::Host::Command command) { log<level::INFO>("Pushing cmd on to queue", entry("CONTROL_HOST_CMD=%s", convertForMessage(command))); - workQueue.push(command); + this->workQueue.push(command); // If this was the only entry then send the SMS attention - if(workQueue.size() == 1) + if(this->workQueue.size() == 1) { log<level::INFO>("Asserting SMS Attention"); |