From 03e7a5b2fefa08d49ef34e70bfb1d52f0a7d828e Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 12 Mar 2009 20:26:36 +0100 Subject: Request-Klassen vereinfacht --- src/Daemon/Requests/IdentifyRequest.cpp | 9 --------- src/Daemon/Requests/IdentifyRequest.h | 1 - src/Daemon/Requests/LogRequest.cpp | 9 --------- src/Daemon/Requests/LogRequest.h | 1 - 4 files changed, 20 deletions(-) (limited to 'src/Daemon') 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) -- cgit v1.2.3