From b503a70fca019368399038cde649b3ef8df85bb9 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 18 Sep 2008 14:51:48 +0200 Subject: Flexiblere ?bertragung von Host-Listen --- src/Core/RequestHandlers/DaemonListRequestHandler.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/Core/RequestHandlers') diff --git a/src/Core/RequestHandlers/DaemonListRequestHandler.cpp b/src/Core/RequestHandlers/DaemonListRequestHandler.cpp index 2a6b119..cec1c5a 100644 --- a/src/Core/RequestHandlers/DaemonListRequestHandler.cpp +++ b/src/Core/RequestHandlers/DaemonListRequestHandler.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include namespace Mad { namespace Core { @@ -39,13 +39,7 @@ void DaemonListRequestHandler::handlePacket(Net::Connection *connection, const N // TODO Require authentication - std::map daemons = ConnectionManager::getConnectionManager()->getDaemonList(); - std::vector names; - - for(std::map::iterator daemon = daemons.begin(); daemon != daemons.end(); ++daemon) - names.push_back(daemon->first); - - connection->send(Net::Packets::NameListPacket(Net::Packet::OK, packet.getRequestId(), names)); + connection->send(Net::Packets::HostListPacket(Net::Packet::OK, packet.getRequestId(), ConnectionManager::getConnectionManager()->getDaemonList())); signalFinished().emit(); } -- cgit v1.2.3