handler: Implement open as a pass-through function
When opening a blob id, handler finds a blobstore with matching
base id and calls its open function, passing down the path and open
flags.
Signed-off-by: Kun Yi <kunyi@google.com>
Change-Id: I6127b3c2b2c4752b5e094db61f12451089ccb20b
diff --git a/handler.hpp b/handler.hpp
index 61ded36..2a75a57 100644
--- a/handler.hpp
+++ b/handler.hpp
@@ -61,8 +61,8 @@
std::map<std::string, std::unique_ptr<binstore::BinaryStoreInterface>>
stores_;
- /* map of sessionId: open binaryStore base, which has a 1:1 relationship. */
- std::unordered_map<uint16_t, std::string> sessions_;
+ /* map of sessionId: open binaryStore pointer. */
+ std::unordered_map<uint16_t, binstore::BinaryStoreInterface*> sessions_;
};
} // namespace blobs