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/rakp12.cpp b/command/rakp12.cpp
index 099c5dc..7d349c6 100644
--- a/command/rakp12.cpp
+++ b/command/rakp12.cpp
@@ -3,7 +3,7 @@
#include "comm_module.hpp"
#include "endian.hpp"
#include "guid.hpp"
-#include "main.hpp"
+#include "sessions_manager.hpp"
#include <openssl/rand.h>
@@ -50,9 +50,8 @@
std::shared_ptr<session::Session> session;
try
{
- session =
- std::get<session::Manager&>(singletonPool)
- .getSession(endian::from_ipmi(request->managedSystemSessionID));
+ session = session::Manager::get().getSession(
+ endian::from_ipmi(request->managedSystemSessionID));
}
catch (std::exception& e)
{