diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-11-20 17:02:39 +0100 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-11-20 17:02:39 +0100 |
commit | e17b967c6195b074af03fad14b0b2947c53536e2 (patch) | |
tree | 9683d2e24429179ed3cc856b208cf9835b8aff8e /src/Core | |
parent | d002476c5e6b8f6bc728063fc8e7ce74da562e57 (diff) | |
download | mad-e17b967c6195b074af03fad14b0b2947c53536e2.tar mad-e17b967c6195b074af03fad14b0b2947c53536e2.zip |
Paket-Typen korrekt deregistrieren
Diffstat (limited to 'src/Core')
-rw-r--r-- | src/Core/ConnectionManager.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/Core/ConnectionManager.cpp b/src/Core/ConnectionManager.cpp index 833e2e6..63b29e1 100644 --- a/src/Core/ConnectionManager.cpp +++ b/src/Core/ConnectionManager.cpp @@ -132,6 +132,8 @@ void ConnectionManager::configFinished() { ConnectionManager::ConnectionManager() { Common::RequestManager::get()->setCore(true); + Net::Connection::init(); + Common::RequestManager::get()->registerPacketType<Common::RequestHandlers::FSInfoRequestHandler>(Net::Packet::FS_INFO); Common::RequestManager::get()->registerPacketType<Common::RequestHandlers::StatusRequestHandler>(Net::Packet::STATUS); Common::RequestManager::get()->registerPacketType<RequestHandlers::DaemonCommandRequestHandler>(Net::Packet::DAEMON_COMMAND_REBOOT); @@ -142,8 +144,6 @@ ConnectionManager::ConnectionManager() { Common::RequestManager::get()->registerPacketType<RequestHandlers::GSSAPIAuthRequestHandler>(Net::Packet::GSSAPI_AUTH); Common::RequestManager::get()->registerPacketType<RequestHandlers::IdentifyRequestHandler>(Net::Packet::IDENTIFY); Common::RequestManager::get()->registerPacketType<RequestHandlers::LogRequestHandler>(Net::Packet::LOG); - - Net::Connection::init(); } ConnectionManager::~ConnectionManager() { @@ -153,6 +153,17 @@ ConnectionManager::~ConnectionManager() { for(std::list<Net::ServerConnection*>::iterator con = clientConnections.begin(); con != clientConnections.end(); ++con) delete *con; + Common::RequestManager::get()->unregisterPacketType(Net::Packet::FS_INFO); + Common::RequestManager::get()->unregisterPacketType(Net::Packet::STATUS); + Common::RequestManager::get()->unregisterPacketType(Net::Packet::DAEMON_COMMAND_REBOOT); + Common::RequestManager::get()->unregisterPacketType(Net::Packet::DAEMON_COMMAND_SHUTDOWN); + Common::RequestManager::get()->unregisterPacketType(Net::Packet::DAEMON_FS_INFO); + Common::RequestManager::get()->unregisterPacketType(Net::Packet::LIST_DAEMONS); + Common::RequestManager::get()->unregisterPacketType(Net::Packet::DAEMON_STATUS); + Common::RequestManager::get()->unregisterPacketType(Net::Packet::GSSAPI_AUTH); + Common::RequestManager::get()->unregisterPacketType(Net::Packet::IDENTIFY); + Common::RequestManager::get()->unregisterPacketType(Net::Packet::LOG); + Net::Connection::deinit(); } |