summaryrefslogtreecommitdiffstats
path: root/src/Common/Requests/DisconnectRequest.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-09-15 06:26:15 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-09-15 06:26:15 +0200
commit9ca70bbfa460fe1c6c31b8e685be6df24935ab73 (patch)
tree8fe0a6e164d7d2f4e5f23e073c0a80a0b29daf94 /src/Common/Requests/DisconnectRequest.cpp
parent30bec92571ba23f1f2aa6b12149f6545a4ef0d7e (diff)
downloadmad-9ca70bbfa460fe1c6c31b8e685be6df24935ab73.tar
mad-9ca70bbfa460fe1c6c31b8e685be6df24935ab73.zip
Kann jetzt Status von Daemons abfragen
Diffstat (limited to 'src/Common/Requests/DisconnectRequest.cpp')
-rw-r--r--src/Common/Requests/DisconnectRequest.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/Common/Requests/DisconnectRequest.cpp b/src/Common/Requests/DisconnectRequest.cpp
index 0b6e3bc..090b840 100644
--- a/src/Common/Requests/DisconnectRequest.cpp
+++ b/src/Common/Requests/DisconnectRequest.cpp
@@ -37,20 +37,13 @@ bool DisconnectRequest::send(Net::Connection *connection, const sigc::slot<void>
}
bool DisconnectRequest::sendRequest(Net::Connection *connection, uint16_t requestId) {
- if(isSent())
- return false;
-
if(!connection->send(Net::Packet(Net::Packet::DISCONNECT, requestId)))
return false;
- setSent();
return true;
}
bool DisconnectRequest::handlePacket(Net::Connection *connection, const Net::Packet &packet) {
- if(isFinished())
- return false;
-
if(packet.getType() != Net::Packet::OK)
return false; // TODO Logging
@@ -58,7 +51,7 @@ bool DisconnectRequest::handlePacket(Net::Connection *connection, const Net::Pac
finished();
- setFinished();
+ signalFinished().emit();
return true;
}