summaryrefslogtreecommitdiffstats
path: root/src/Server/RequestHandlers/IdentifyRequestHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Server/RequestHandlers/IdentifyRequestHandler.cpp')
-rw-r--r--src/Server/RequestHandlers/IdentifyRequestHandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Server/RequestHandlers/IdentifyRequestHandler.cpp b/src/Server/RequestHandlers/IdentifyRequestHandler.cpp
index 5300c19..1b94a52 100644
--- a/src/Server/RequestHandlers/IdentifyRequestHandler.cpp
+++ b/src/Server/RequestHandlers/IdentifyRequestHandler.cpp
@@ -26,8 +26,8 @@ namespace Mad {
namespace Server {
namespace RequestHandlers {
-void IdentifyRequestHandler::handlePacket(const Common::XmlPacket &packet) {
- if(packet.getType() != "Identify") {
+void IdentifyRequestHandler::handlePacket(boost::shared_ptr<const Common::XmlPacket> packet) {
+ if(packet->getType() != "Identify") {
Common::Logger::log(Common::Logger::ERROR, "Received an unexpected packet.");
Common::XmlPacket ret;
@@ -42,10 +42,10 @@ void IdentifyRequestHandler::handlePacket(const Common::XmlPacket &packet) {
// TODO Require authentication
try {
- if(packet["hostname"].isEmpty())
+ if((*packet)["hostname"].isEmpty())
ConnectionManager::get()->identifyClientConnection(getConnection());
else
- ConnectionManager::get()->identifyDaemonConnection(getConnection(), packet["hostname"]);
+ ConnectionManager::get()->identifyDaemonConnection(getConnection(), (*packet)["hostname"]);
Common::XmlPacket ret;
ret.setType("OK");