diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-09-18 14:51:48 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-09-18 14:51:48 +0200 |
commit | b503a70fca019368399038cde649b3ef8df85bb9 (patch) | |
tree | 60fa313583dcf0482e7bab70dfa2fa8e34fd62cd /src/Core/RequestHandlers | |
parent | d84a3b91346038bf55d7111462dab42a0a26445d (diff) | |
download | mad-b503a70fca019368399038cde649b3ef8df85bb9.tar mad-b503a70fca019368399038cde649b3ef8df85bb9.zip |
Flexiblere ?bertragung von Host-Listen
Diffstat (limited to 'src/Core/RequestHandlers')
-rw-r--r-- | src/Core/RequestHandlers/DaemonListRequestHandler.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
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 <Common/Logger.h> #include <Net/Connection.h> #include <Net/Packets/ErrorPacket.h> -#include <Net/Packets/NameListPacket.h> +#include <Net/Packets/HostListPacket.h> namespace Mad { namespace Core { @@ -39,13 +39,7 @@ void DaemonListRequestHandler::handlePacket(Net::Connection *connection, const N // TODO Require authentication - std::map<std::string,DaemonInfo> daemons = ConnectionManager::getConnectionManager()->getDaemonList(); - std::vector<std::string> names; - - for(std::map<std::string,DaemonInfo>::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(); } |