summaryrefslogtreecommitdiffstats
path: root/src/Common/Requests/IdentifyRequest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Requests/IdentifyRequest.cpp')
-rw-r--r--src/Common/Requests/IdentifyRequest.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/Common/Requests/IdentifyRequest.cpp b/src/Common/Requests/IdentifyRequest.cpp
index 54d49e2..9214baf 100644
--- a/src/Common/Requests/IdentifyRequest.cpp
+++ b/src/Common/Requests/IdentifyRequest.cpp
@@ -36,24 +36,17 @@ bool IdentifyRequest::send(Net::Connection *connection, const std::string &hostn
}
bool IdentifyRequest::sendRequest(Net::Connection *connection, uint16_t requestId) {
- if(isSent())
- return false;
-
if(!connection->send(Net::Packet(Net::Packet::IDENTIFY, requestId, hostname.c_str(), hostname.length())))
return false;
- setSent();
return true;
}
bool IdentifyRequest::handlePacket(Net::Connection*, const Net::Packet &packet) {
- if(isFinished())
- return false;
-
if(packet.getType() != Net::Packet::OK)
return false; // TODO Logging
- setFinished();
+ signalFinished().emit();
return true;
}