[svn] commit: r3642 - in /branches/vorner-recursor-timeouts/src/bin/recurse: recursor.cc recursor.h
BIND 10 source code commits
bind10-changes at lists.isc.org
Sat Nov 27 22:35:41 UTC 2010
Author: vorner
Date: Sat Nov 27 22:35:41 2010
New Revision: 3642
Log:
Address some review comments
Modified:
branches/vorner-recursor-timeouts/src/bin/recurse/recursor.cc
branches/vorner-recursor-timeouts/src/bin/recurse/recursor.h
Modified: branches/vorner-recursor-timeouts/src/bin/recurse/recursor.cc
==============================================================================
--- branches/vorner-recursor-timeouts/src/bin/recurse/recursor.cc (original)
+++ branches/vorner-recursor-timeouts/src/bin/recurse/recursor.cc Sat Nov 27 22:35:41 2010
@@ -20,6 +20,7 @@
#include <algorithm>
#include <vector>
+#include <cassert>
#include <asiolink/asiolink.h>
#include <asiolink/ioaddress.h>
@@ -65,7 +66,7 @@
public:
RecursorImpl() :
config_session_(NULL),
- rec_query_()
+ rec_query_(NULL)
{}
~RecursorImpl() {
@@ -73,6 +74,7 @@
}
void querySetup(DNSService& dnss) {
+ assert(!rec_query_); // queryShutdown must be called first
dlog("Query setup");
rec_query_ = new RecursiveQuery(dnss, upstream_);
}
@@ -217,7 +219,6 @@
// into a wire-format response.
class MessageAnswer : public DNSAnswer {
public:
- MessageAnswer(Recursor* srv) : server_(srv) {}
virtual void operator()(const IOMessage& io_message,
MessagePtr message,
OutputBufferPtr buffer) const
@@ -293,9 +294,6 @@
boost::lexical_cast<string>(renderer.getLength()) + "bytes): \n" +
message->toText());
}
-
-private:
- Recursor* server_;
};
// This is a derived class of \c SimpleCallback, to serve
@@ -317,7 +315,7 @@
impl_(new RecursorImpl()),
checkin_(new ConfigCheck(this)),
dns_lookup_(new MessageLookup(this)),
- dns_answer_(new MessageAnswer(this))
+ dns_answer_(new MessageAnswer)
{}
Recursor::~Recursor() {
Modified: branches/vorner-recursor-timeouts/src/bin/recurse/recursor.h
==============================================================================
--- branches/vorner-recursor-timeouts/src/bin/recurse/recursor.h (original)
+++ branches/vorner-recursor-timeouts/src/bin/recurse/recursor.h Sat Nov 27 22:35:41 2010
@@ -28,6 +28,15 @@
class RecursorImpl;
+/**
+ * \short The recursive nameserver.
+ *
+ * It is a concreate class implementing recursive DNS server protocol
+ * processing. It is responsible for handling incoming DNS requests. It parses
+ * them, passes them deeper into the resolving machinery and then creates the
+ * answer. It doesn't really know about chasing referrals and similar, it
+ * simply plugs the parts that know into the network handling code.
+ */
class Recursor {
///
/// \name Constructors, Assignment Operator and Destructor.
More information about the bind10-changes
mailing list