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.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Server/RequestHandlers/IdentifyRequestHandler.cpp b/src/Server/RequestHandlers/IdentifyRequestHandler.cpp
index f69b3f5..b47b505 100644
--- a/src/Server/RequestHandlers/IdentifyRequestHandler.cpp
+++ b/src/Server/RequestHandlers/IdentifyRequestHandler.cpp
@@ -42,7 +42,10 @@ void IdentifyRequestHandler::handlePacket(const Common::XmlPacket &packet) {
// TODO Require authentication
try {
- ConnectionManager::get()->identifyDaemonConnection(getConnection(), packet["hostname"]);
+ if(packet["hostname"].isEmpty())
+ ConnectionManager::get()->identifyClientConnection(getConnection());
+ else
+ ConnectionManager::get()->identifyDaemonConnection(getConnection(), packet["hostname"]);
Common::XmlPacket ret;
ret.setType("OK");