bmc: drop unused Session::State
Originally added and used to track the state of the Session object,
however, we have other mechanisms to know this information and therefore
never check this. Remove unused Session::State
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ib4a14cea94f919c3b88e9f944e7cb9498613b3b2
diff --git a/firmware_handler.cpp b/firmware_handler.cpp
index 4504937..865c045 100644
--- a/firmware_handler.cpp
+++ b/firmware_handler.cpp
@@ -360,7 +360,6 @@
if (path == verifyBlobId)
{
verifyImage.flags = flags;
- verifyImage.state = Session::State::open;
lookup[session] = &verifyImage;
@@ -378,7 +377,6 @@
if (path == updateBlobId)
{
updateImage.flags = flags;
- updateImage.state = Session::State::open;
lookup[session] = &updateImage;
@@ -476,7 +474,6 @@
curr->flags = flags;
curr->dataHandler = d->handler;
curr->imageHandler = h->handler;
- curr->state = Session::State::open;
lookup[session] = curr;
@@ -705,7 +702,6 @@
item->second->imageHandler->close();
}
- item->second->state = Session::State::closed;
lookup.erase(item);
fileOpen = false;
return true;
diff --git a/firmware_handler.hpp b/firmware_handler.hpp
index 9aab59a..6aae5b6 100644
--- a/firmware_handler.hpp
+++ b/firmware_handler.hpp
@@ -29,8 +29,7 @@
* @param[in] the active path to which this corresponds.
*/
explicit Session(const std::string& path) :
- dataHandler(nullptr), imageHandler(nullptr), flags(0),
- state(State::closed), activePath(path)
+ dataHandler(nullptr), imageHandler(nullptr), flags(0), activePath(path)
{
}
@@ -48,16 +47,6 @@
/** The flags used to open the session. */
std::uint16_t flags;
- /** A sesion can be for an image (or tarball) or the hash. */
- enum class State
- {
- open = 0,
- closed = 1,
- };
-
- /** The current state of this session. */
- State state;
-
/** The active path. */
std::string activePath;
};