summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Joseph <tomjoseph@in.ibm.com>2017-03-14 15:20:19 +0530
committerPatrick Williams <patrick@stwcx.xyz>2017-04-24 16:11:14 +0000
commit52f53d7d84e96264c0d6bc3b5c328f22b37a3d24 (patch)
treeb11a6c054d2f550f97710cbb85471c76c88bee19
parent5a454a2fbb09677cc5d147a07c56ee9951f02942 (diff)
downloadphosphor-net-ipmid-52f53d7d84e96264c0d6bc3b5c328f22b37a3d24.tar.gz
phosphor-net-ipmid-52f53d7d84e96264c0d6bc3b5c328f22b37a3d24.zip
Add SOL manager and event loop to the Singleton pool
Change-Id: Id619d9b674bcc739cb013042a39d5ae2d38571d2 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
-rw-r--r--main.cpp7
-rw-r--r--main.hpp7
2 files changed, 11 insertions, 3 deletions
diff --git a/main.cpp b/main.cpp
index d96d1cd..f6cdeec 100644
--- a/main.cpp
+++ b/main.cpp
@@ -17,13 +17,16 @@
#include "message.hpp"
#include "message_handler.hpp"
#include "provider_registration.hpp"
-#include "sessions_manager.hpp"
#include "socket_channel.hpp"
// Tuple of Global Singletons
session::Manager manager;
command::Table table;
-std::tuple<session::Manager&, command::Table&> singletonPool(manager, table);
+eventloop::EventLoop loop;
+sol::Manager solManager;
+
+std::tuple<session::Manager&, command::Table&, eventloop::EventLoop&,
+ sol::Manager&> singletonPool(manager, table, loop, solManager);
sd_bus* bus = nullptr;
FILE* ipmidbus = nullptr;
diff --git a/main.hpp b/main.hpp
index cfb80c6..2b5f509 100644
--- a/main.hpp
+++ b/main.hpp
@@ -4,9 +4,14 @@
#include <command_table.hpp>
#include <sessions_manager.hpp>
+#include "sol/sol_manager.hpp"
+#include "sd_event_loop.hpp"
-extern std::tuple<session::Manager&, command::Table&> singletonPool;
+extern std::tuple<session::Manager&, command::Table&,
+ eventloop::EventLoop&, sol::Manager&> singletonPool;
// Select call timeout is set arbitarily set to 30 sec
static constexpr size_t SELECT_CALL_TIMEOUT = 30;
static const auto IPMI_STD_PORT = 623;
+
+extern sd_bus* bus;
OpenPOWER on IntegriCloud