diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-03-12 20:26:36 +0100 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-03-12 20:26:36 +0100 |
commit | 03e7a5b2fefa08d49ef34e70bfb1d52f0a7d828e (patch) | |
tree | 863952edd85e56578e0810adbdccea3a1bf47e61 /src/Daemon | |
parent | de5fa3867791bf4bf84a52de8cd09821f9ce28ab (diff) | |
download | mad-03e7a5b2fefa08d49ef34e70bfb1d52f0a7d828e.tar mad-03e7a5b2fefa08d49ef34e70bfb1d52f0a7d828e.zip |
Request-Klassen vereinfacht
Diffstat (limited to 'src/Daemon')
-rw-r--r-- | src/Daemon/Requests/IdentifyRequest.cpp | 9 | ||||
-rw-r--r-- | src/Daemon/Requests/IdentifyRequest.h | 1 | ||||
-rw-r--r-- | src/Daemon/Requests/LogRequest.cpp | 9 | ||||
-rw-r--r-- | src/Daemon/Requests/LogRequest.h | 1 |
4 files changed, 0 insertions, 20 deletions
diff --git a/src/Daemon/Requests/IdentifyRequest.cpp b/src/Daemon/Requests/IdentifyRequest.cpp index 6334f00..1ae9372 100644 --- a/src/Daemon/Requests/IdentifyRequest.cpp +++ b/src/Daemon/Requests/IdentifyRequest.cpp @@ -33,15 +33,6 @@ void IdentifyRequest::sendRequest(Net::Connection *connection, uint16_t requestI connection->send(packet.encode(requestId)); } -void IdentifyRequest::handlePacket(Net::Connection*, uint16_t, const Common::XmlPacket &packet) { - if(packet.getType() != "OK") { - finishWithError(Common::Exception(Common::Exception::UNEXPECTED_PACKET)); - return; // TODO Logging - } - - finish(packet); -} - } } } diff --git a/src/Daemon/Requests/IdentifyRequest.h b/src/Daemon/Requests/IdentifyRequest.h index 5009374..b3f48ab 100644 --- a/src/Daemon/Requests/IdentifyRequest.h +++ b/src/Daemon/Requests/IdentifyRequest.h @@ -33,7 +33,6 @@ class IdentifyRequest : public Common::Request { protected: virtual void sendRequest(Net::Connection *connection, uint16_t requestId); - virtual void handlePacket(Net::Connection*, uint16_t, const Common::XmlPacket &packet); public: IdentifyRequest(const std::string &hostname0, slot_type slot) : Common::Request(slot), hostname(hostname0) {} diff --git a/src/Daemon/Requests/LogRequest.cpp b/src/Daemon/Requests/LogRequest.cpp index f7a498d..a7c4d03 100644 --- a/src/Daemon/Requests/LogRequest.cpp +++ b/src/Daemon/Requests/LogRequest.cpp @@ -37,15 +37,6 @@ void LogRequest::sendRequest(Net::Connection *connection, uint16_t requestId) { connection->send(packet.encode(requestId)); } -void LogRequest::handlePacket(Net::Connection*, uint16_t, const Common::XmlPacket &packet) { - if(packet.getType() != "OK") { - finishWithError(Common::Exception(Common::Exception::UNEXPECTED_PACKET)); - return; // TODO Logging - } - - finish(packet); -} - } } } diff --git a/src/Daemon/Requests/LogRequest.h b/src/Daemon/Requests/LogRequest.h index 1045a2f..7cceade 100644 --- a/src/Daemon/Requests/LogRequest.h +++ b/src/Daemon/Requests/LogRequest.h @@ -37,7 +37,6 @@ class LogRequest : public Common::Request { protected: virtual void sendRequest(Net::Connection *connection, uint16_t requestId); - virtual void handlePacket(Net::Connection*, uint16_t, const Common::XmlPacket &packet); public: LogRequest(Common::Logger::MessageCategory category0, Common::Logger::MessageLevel level0, time_t messageTimestamp0, const std::string &message0, slot_type slot) |