diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-09-15 06:26:15 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-09-15 06:26:15 +0200 |
commit | 9ca70bbfa460fe1c6c31b8e685be6df24935ab73 (patch) | |
tree | 8fe0a6e164d7d2f4e5f23e073c0a80a0b29daf94 /src/Common/Requests | |
parent | 30bec92571ba23f1f2aa6b12149f6545a4ef0d7e (diff) | |
download | mad-9ca70bbfa460fe1c6c31b8e685be6df24935ab73.tar mad-9ca70bbfa460fe1c6c31b8e685be6df24935ab73.zip |
Kann jetzt Status von Daemons abfragen
Diffstat (limited to 'src/Common/Requests')
-rw-r--r-- | src/Common/Requests/DisconnectRequest.cpp | 9 | ||||
-rw-r--r-- | src/Common/Requests/GSSAPIAuthRequest.cpp | 9 | ||||
-rw-r--r-- | src/Common/Requests/IdentifyRequest.cpp | 9 |
3 files changed, 3 insertions, 24 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; } diff --git a/src/Common/Requests/GSSAPIAuthRequest.cpp b/src/Common/Requests/GSSAPIAuthRequest.cpp index 705db41..a4a1b17 100644 --- a/src/Common/Requests/GSSAPIAuthRequest.cpp +++ b/src/Common/Requests/GSSAPIAuthRequest.cpp @@ -48,9 +48,6 @@ bool GSSAPIAuthRequest::send(Net::Connection *connection, const std::string &ser } bool GSSAPIAuthRequest::sendRequest(Net::Connection *connection, uint16_t requestId) { - if(isSent()) - return false; - OM_uint32 majStat, minStat; gss_buffer_desc buffer; @@ -86,14 +83,10 @@ bool GSSAPIAuthRequest::sendRequest(Net::Connection *connection, uint16_t reques gss_release_buffer(&minStat, &buffer); - setSent(); return true; } bool GSSAPIAuthRequest::handlePacket(Net::Connection *connection, const Net::Packet &packet) { - if(isFinished()) - return false; - if(packet.getType() != Net::Packet::GSSAPI_AUTH) return false; // TODO Logging @@ -160,7 +153,7 @@ bool GSSAPIAuthRequest::handlePacket(Net::Connection *connection, const Net::Pac gss_release_buffer(&minStat, &sendBuffer); - setFinished(); + signalFinished().emit(); } return true; 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; } |