diff options
Diffstat (limited to 'src/Core/ConnectionManager.cpp')
-rw-r--r-- | src/Core/ConnectionManager.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Core/ConnectionManager.cpp b/src/Core/ConnectionManager.cpp index 7df9e8b..833e2e6 100644 --- a/src/Core/ConnectionManager.cpp +++ b/src/Core/ConnectionManager.cpp @@ -42,7 +42,7 @@ namespace Mad { namespace Core { -ConnectionManager ConnectionManager::connectionManager; +Common::SingletonPtr<ConnectionManager> ConnectionManager::connectionManager; void ConnectionManager::updateState(const std::string &name, Common::HostInfo::State state) { @@ -129,9 +129,8 @@ void ConnectionManager::configFinished() { } } -void ConnectionManager::doInit() { +ConnectionManager::ConnectionManager() { Common::RequestManager::get()->setCore(true); - Common::RequestManager::get()->init(); Common::RequestManager::get()->registerPacketType<Common::RequestHandlers::FSInfoRequestHandler>(Net::Packet::FS_INFO); Common::RequestManager::get()->registerPacketType<Common::RequestHandlers::StatusRequestHandler>(Net::Packet::STATUS); @@ -147,7 +146,7 @@ void ConnectionManager::doInit() { Net::Connection::init(); } -void ConnectionManager::doDeinit() { +ConnectionManager::~ConnectionManager() { for(std::list<Net::ServerConnection*>::iterator con = daemonConnections.begin(); con != daemonConnections.end(); ++con) delete *con; @@ -183,7 +182,7 @@ void ConnectionManager::handleConnections(std::list<Net::ServerConnection*>& con void ConnectionManager::run() { // TODO Logging - Net::FdManager::getFdManager()->run(); + Net::FdManager::get()->run(); handleConnections(daemonConnections); handleConnections(clientConnections); |