replace tuple-based singleton with individual singletons
The tuple-based singletons did not actually enforce singleton behavior
and the requirement of the accessor mechanism to include all of the
member types at once was starting to cause a header prerequisite
tangle. This removes the cross-dependencies and enforces actual
singletons by making a single way to access the class.
Tested: Run ipmitool to show that behavior has not changed
Change-Id: Ie966e1142363d279365b1095066380c8383e9f9b
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/command/open_session.cpp b/command/open_session.cpp
index 9ba00ec..2887d37 100644
--- a/command/open_session.cpp
+++ b/command/open_session.cpp
@@ -2,7 +2,7 @@
#include "comm_module.hpp"
#include "endian.hpp"
-#include "main.hpp"
+#include "sessions_manager.hpp"
#include <phosphor-logging/log.hpp>
@@ -77,15 +77,11 @@
try
{
// Start an IPMI session
- session =
- std::get<session::Manager&>(singletonPool)
- .startSession(
- endian::from_ipmi<>(request->remoteConsoleSessionID), priv,
- static_cast<cipher::rakp_auth::Algorithms>(
- request->authAlgo),
- static_cast<cipher::integrity::Algorithms>(
- request->intAlgo),
- static_cast<cipher::crypt::Algorithms>(request->confAlgo));
+ session = session::Manager::get().startSession(
+ endian::from_ipmi<>(request->remoteConsoleSessionID), priv,
+ static_cast<cipher::rakp_auth::Algorithms>(request->authAlgo),
+ static_cast<cipher::integrity::Algorithms>(request->intAlgo),
+ static_cast<cipher::crypt::Algorithms>(request->confAlgo));
}
catch (std::exception& e)
{