BIND 10 trac1022, updated. c4430b49b30dcd74226d272fa3da4812afc2c6f7 [trac1022] Address tickets 1022 and 1023
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Jun 20 13:10:47 UTC 2011
The branch, trac1022 has been updated
via c4430b49b30dcd74226d272fa3da4812afc2c6f7 (commit)
from 3665d7750795ee247864c5619301bd1638c31175 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c4430b49b30dcd74226d272fa3da4812afc2c6f7
Author: Stephen Morris <stephen at isc.org>
Date: Mon Jun 20 14:10:18 2011 +0100
[trac1022] Address tickets 1022 and 1023
-----------------------------------------------------------------------
Summary of changes:
src/bin/auth/main.cc | 6 ++++++
src/lib/datasrc/cache.cc | 16 ++++++++++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/auth/main.cc b/src/bin/auth/main.cc
index 0324c6e..36c616e 100644
--- a/src/bin/auth/main.cc
+++ b/src/bin/auth/main.cc
@@ -47,6 +47,7 @@
#include <asiodns/asiodns.h>
#include <asiolink/asiolink.h>
#include <log/dummylog.h>
+#include <log/logger_support.h>
#include <server_common/keyring.h>
using namespace std;
@@ -118,6 +119,11 @@ main(int argc, char* argv[]) {
usage();
}
+ // Initialize logging. If verbose, we'll use maximum verbosity.
+ isc::log::initLogger("b10-auth",
+ (verbose_mode ? isc::log::DEBUG : isc::log::INFO),
+ isc::log::MAX_DEBUG_LEVEL, NULL);
+
int ret = 0;
// XXX: we should eventually pass io_service here.
diff --git a/src/lib/datasrc/cache.cc b/src/lib/datasrc/cache.cc
index 8e9487d..467d62c 100644
--- a/src/lib/datasrc/cache.cc
+++ b/src/lib/datasrc/cache.cc
@@ -100,6 +100,18 @@ public:
/// \return \c RRsetPtr
RRsetPtr getRRset() const { return (entry->rrset); }
+ /// \brief Returns name associated with cached node
+ /// This is the name associated with the RRset if it is a positive
+ /// entry, and the associated question name if the RRSet is NULL
+ /// and this is a negative entry (together with an indication that
+ /// this is a negative entry).
+ string getNodeName() const {
+ if (getRRset()) {
+ return (getRRset()->getName().toText());
+ }
+ return (std::string("negative entry for ") + question.toText());
+ }
+
/// \brief Returns the query response flags associated with the data.
///
/// \return \c uint32_t
@@ -213,7 +225,7 @@ HotCacheImpl::HotCacheImpl(int slots, bool enabled) :
inline void
HotCacheImpl::insert(const CacheNodePtr node) {
LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_CACHE_INSERT).
- arg(node->getRRset()->getName());
+ arg(node->getNodeName());
std::map<Question, CacheNodePtr>::const_iterator iter;
iter = map_.find(node->question);
if (iter != map_.end()) {
@@ -253,7 +265,7 @@ HotCacheImpl::promote(CacheNodePtr node) {
void
HotCacheImpl::remove(ConstCacheNodePtr node) {
LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_CACHE_REMOVE).
- arg(node->getRRset()->getName());
+ arg(node->getNodeName());
lru_.erase(node->lru_entry_);
map_.erase(node->question);
--count_;
More information about the bind10-changes
mailing list