version-handler: Remove superfluous open session check
The phosphor-ipmi-flash API guarantees that calls to open() will not
happen with duplicate session IDs.
Change-Id: Ife88b2743322387e5cc6ebe2b34567c3d2d2957a
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/bmc/version-handler/version_handler.cpp b/bmc/version-handler/version_handler.cpp
index 76de76c..5d66713 100644
--- a/bmc/version-handler/version_handler.cpp
+++ b/bmc/version-handler/version_handler.cpp
@@ -70,13 +70,7 @@
}
auto& v = *blobInfoMap.at(path);
- auto [it, emplaced] = sessionToBlob.try_emplace(session, &v);
- if (!emplaced)
- {
- fprintf(stderr, "open %s fail: session number %d assigned to %s\n",
- path.c_str(), session, it->second->blobId.c_str());
- return false;
- }
+ sessionToBlob[session] = &v;
if (v.blobState == blobs::StateFlags::open_read)
{