summaryrefslogtreecommitdiffstats
path: root/src/Core/RequestHandlers
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-09-18 14:51:48 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-09-18 14:51:48 +0200
commitb503a70fca019368399038cde649b3ef8df85bb9 (patch)
tree60fa313583dcf0482e7bab70dfa2fa8e34fd62cd /src/Core/RequestHandlers
parentd84a3b91346038bf55d7111462dab42a0a26445d (diff)
downloadmad-b503a70fca019368399038cde649b3ef8df85bb9.tar
mad-b503a70fca019368399038cde649b3ef8df85bb9.zip
Flexiblere ?bertragung von Host-Listen
Diffstat (limited to 'src/Core/RequestHandlers')
-rw-r--r--src/Core/RequestHandlers/DaemonListRequestHandler.cpp10
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();
}