From: Michal 'vorner' Vaner Date: Tue, 21 Feb 2012 14:15:19 +0000 (+0100) Subject: [1599] Remove some cruft X-Git-Tag: trac2351_base~226^2~116^2~163^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ecd7dbe0f231c04d19eba3cd02ff513a23a9003a;p=thirdparty%2Fkea.git [1599] Remove some cruft These methods are not used in the code at all. And they seem like useless anyway. --- diff --git a/src/lib/asiodns/dns_server.h b/src/lib/asiodns/dns_server.h index d3a8528da8..119aa66608 100644 --- a/src/lib/asiodns/dns_server.h +++ b/src/lib/asiodns/dns_server.h @@ -88,22 +88,6 @@ public: /// to return. virtual void resume(const bool done) { self_->resume(done); } - /// \brief Indicate whether the server is able to send an answer - /// to a query. - /// - /// This is presently used only for testing purposes. - virtual bool hasAnswer() { return (self_->hasAnswer()); } - - /// \brief Returns the current value of the 'coroutine' object - /// - /// This is a temporary method, intended to be used for debugging - /// purposes during development and removed later. It allows - /// callers from outside the coroutine object to retrieve information - /// about its current state. - /// - /// \return The value of the 'coroutine' object - virtual int value() { return (self_->value()); } - /// \brief Returns a pointer to a clone of this DNSServer object. /// /// When a \c DNSServer object is copied or assigned, the result will diff --git a/src/lib/asiodns/tcp_server.h b/src/lib/asiodns/tcp_server.h index d079e97f12..8ae84f9f73 100644 --- a/src/lib/asiodns/tcp_server.h +++ b/src/lib/asiodns/tcp_server.h @@ -62,14 +62,12 @@ public: void asyncLookup(); void stop(); void resume(const bool done); - bool hasAnswer() { return (done_); } - int value() { return (get_value()); } - DNSServer* clone() { TCPServer* s = new TCPServer(*this); return (s); } + private: enum { MAX_LENGTH = 65535 }; static const size_t TCP_MESSAGE_LENGTHSIZE = 2; diff --git a/src/lib/asiodns/udp_server.cc b/src/lib/asiodns/udp_server.cc index 820db4cc28..990949ec72 100644 --- a/src/lib/asiodns/udp_server.cc +++ b/src/lib/asiodns/udp_server.cc @@ -343,10 +343,5 @@ UDPServer::resume(const bool done) { data_->io_.post(*this); } -bool -UDPServer::hasAnswer() { - return (data_->done_); -} - } // namespace asiodns } // namespace isc diff --git a/src/lib/asiodns/udp_server.h b/src/lib/asiodns/udp_server.h index c82b78c1d3..2b6a574141 100644 --- a/src/lib/asiodns/udp_server.h +++ b/src/lib/asiodns/udp_server.h @@ -83,16 +83,6 @@ public: /// we have an answer void resume(const bool done); - /// \brief Check if we have an answer - /// - /// \return true if we have an answer - bool hasAnswer(); - - /// \brief Returns the coroutine state value - /// - /// \return the coroutine state value - int value() { return (get_value()); } - /// \brief Clones the object /// /// \return a newly allocated copy of this object