Commit 294251d6 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

add answer message to lookup calls

though atm completely unused
parent 34a083b7
......@@ -153,9 +153,13 @@ AuthSrvImpl::~AuthSrvImpl() {
class MessageLookup : public DNSLookup {
public:
MessageLookup(AuthSrv* srv) : server_(srv) {}
virtual void operator()(const IOMessage& io_message, MessagePtr message,
OutputBufferPtr buffer, DNSServer* server) const
virtual void operator()(const IOMessage& io_message,
MessagePtr message,
MessagePtr answer_message,
OutputBufferPtr buffer,
DNSServer* server) const
{
(void) answer_message;
server_->processMessage(io_message, message, buffer, server);
}
private:
......
......@@ -139,6 +139,7 @@ TEST_F(AuthSrvTest, builtInQueryViaDNSServer) {
createRequestPacket(request_message, IPPROTO_UDP);
(*server.getDNSLookupProvider())(*io_message, parse_message,
response_message,
response_obuffer, &dnsserv);
(*server.getDNSAnswerProvider())(*io_message, parse_message,
response_message, response_obuffer);
......@@ -154,6 +155,7 @@ TEST_F(AuthSrvTest, builtInQueryViaDNSServer) {
TEST_F(AuthSrvTest, iqueryViaDNSServer) {
createDataFromFile("iquery_fromWire.wire");
(*server.getDNSLookupProvider())(*io_message, parse_message,
response_message,
response_obuffer, &dnsserv);
(*server.getDNSAnswerProvider())(*io_message, parse_message,
response_message, response_obuffer);
......
......@@ -207,9 +207,13 @@ public:
MessageLookup(Resolver* srv) : server_(srv) {}
// \brief Handle the DNS Lookup
virtual void operator()(const IOMessage& io_message, MessagePtr message,
OutputBufferPtr buffer, DNSServer* server) const
virtual void operator()(const IOMessage& io_message,
MessagePtr message,
MessagePtr answer_message,
OutputBufferPtr buffer,
DNSServer* server) const
{
(void) answer_message,
server_->processMessage(io_message, message, buffer, server);
}
private:
......
......@@ -414,10 +414,11 @@ public:
/// \param DNSServer DNSServer object to use
virtual void operator()(const IOMessage& io_message,
isc::dns::MessagePtr message,
isc::dns::MessagePtr answer_message,
isc::dns::OutputBufferPtr buffer,
DNSServer* server) const
{
(*self_)(io_message, message, buffer, server);
(*self_)(io_message, message, answer_message, buffer, server);
}
private:
DNSLookup* self_;
......
......@@ -179,7 +179,7 @@ TCPServer::operator()(error_code ec, size_t length) {
/// AsyncLookup<TCPServer> handler.)
void
TCPServer::asyncLookup() {
(*lookup_callback_)(*io_message_, message_, respbuf_, this);
(*lookup_callback_)(*io_message_, message_, answer_message_, respbuf_, this);
}
/// Post this coroutine on the ASIO service queue so that it will
......
......@@ -461,7 +461,7 @@ protected:
inline void asyncLookup() {
if (lookup_) {
(*lookup_)(*io_message_, message_, respbuf_, this);
(*lookup_)(*io_message_, message_, answer_message_, respbuf_, this);
}
}
......
......@@ -166,7 +166,7 @@ UDPServer::operator()(error_code ec, size_t length) {
/// AsyncLookup<UDPServer> handler.)
void
UDPServer::asyncLookup() {
(*lookup_callback_)(*io_message_, message_, respbuf_, this);
(*lookup_callback_)(*io_message_, message_, answer_message_, respbuf_, this);
}
/// Post this coroutine on the ASIO service queue so that it will
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment