From e3d0c98e5a867518800bc79c18f7b13755c056e0 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 20 Oct 2008 22:47:07 +0200 Subject: Einige Verbesserungen am ConfigManager --- src/Core/ConnectionManager.cpp | 9 ++++----- src/Core/ConnectionManager.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/Core') diff --git a/src/Core/ConnectionManager.cpp b/src/Core/ConnectionManager.cpp index c135d06..b99296e 100644 --- a/src/Core/ConnectionManager.cpp +++ b/src/Core/ConnectionManager.cpp @@ -55,7 +55,10 @@ void ConnectionManager::updateState(const std::string &name, Common::HostInfo::S } } -bool ConnectionManager::handleConfigEntry(const std::vector > &entry) { +bool ConnectionManager::handleConfigEntry(const std::vector > &entry, bool handled) { + if(handled) + return false; + if(Common::Util::tolower(entry.front().front()) == "listen" && entry.size() == 1) { if(entry.front().size() == 2) { try { @@ -154,14 +157,10 @@ ConnectionManager::ConnectionManager() { Common::RequestManager::getRequestManager()->registerPacketType(Net::Packet::IDENTIFY); Common::RequestManager::getRequestManager()->registerPacketType(Net::Packet::LOG); - Common::ConfigManager::getConfigManager()->registerConfigurable(this); - Net::Connection::init(); } ConnectionManager::~ConnectionManager() { - Common::ConfigManager::getConfigManager()->unregisterConfigurable(this); - for(std::list::iterator con = daemonConnections.begin(); con != daemonConnections.end(); ++con) delete *con; diff --git a/src/Core/ConnectionManager.h b/src/Core/ConnectionManager.h index a069478..d5bb718 100644 --- a/src/Core/ConnectionManager.h +++ b/src/Core/ConnectionManager.h @@ -67,7 +67,7 @@ class ConnectionManager : private Common::Configurable { void updateState(const std::string &name, Common::HostInfo::State state); protected: - virtual bool handleConfigEntry(const std::vector > &entry); + virtual bool handleConfigEntry(const std::vector > &entry, bool handled); virtual void configFinished(); public: -- cgit v1.2.3