BIND 10 master, updated. 99ca75676abbf8360b807a1c36143d87f393c89a Merge branch 'trac1796'
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Feb 3 12:14:39 UTC 2014
The branch, master has been updated
via 99ca75676abbf8360b807a1c36143d87f393c89a (commit)
via fb50e3b350be1d916b085cb254a225e5143ecab1 (commit)
from cc0fc600dfdc1f4652aa7ec5a7472db06c1cbd4d (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 99ca75676abbf8360b807a1c36143d87f393c89a
Merge: cc0fc60 fb50e3b
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Feb 3 15:41:45 2014 +0530
Merge branch 'trac1796'
-----------------------------------------------------------------------
Summary of changes:
src/bin/auth/query.cc | 14 --------------
src/bin/auth/query.h | 12 ++++++++++++
2 files changed, 12 insertions(+), 14 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/auth/query.cc b/src/bin/auth/query.cc
index 87f8e91..9f92316 100644
--- a/src/bin/auth/query.cc
+++ b/src/bin/auth/query.cc
@@ -37,20 +37,6 @@ using namespace isc::dns;
using namespace isc::datasrc;
using namespace isc::dns::rdata;
-// This is a "constant" vector storing desired RR types for the additional
-// section. The vector is filled first time it's used.
-namespace {
-const vector<RRType>&
-A_AND_AAAA() {
- static vector<RRType> needed_types;
- if (needed_types.empty()) {
- needed_types.push_back(RRType::A());
- needed_types.push_back(RRType::AAAA());
- }
- return (needed_types);
-}
-}
-
namespace isc {
namespace auth {
diff --git a/src/bin/auth/query.h b/src/bin/auth/query.h
index 2c08312..a692dcc 100644
--- a/src/bin/auth/query.h
+++ b/src/bin/auth/query.h
@@ -286,6 +286,9 @@ public:
answers_.reserve(RESERVE_RRSETS);
authorities_.reserve(RESERVE_RRSETS);
additionals_.reserve(RESERVE_RRSETS);
+
+ a_and_aaaa_.push_back(isc::dns::RRType::A());
+ a_and_aaaa_.push_back(isc::dns::RRType::AAAA());
}
@@ -488,6 +491,15 @@ private:
std::vector<isc::dns::ConstRRsetPtr> answers_;
std::vector<isc::dns::ConstRRsetPtr> authorities_;
std::vector<isc::dns::ConstRRsetPtr> additionals_;
+
+private:
+ /// \brief Returns a reference to a pre-initialized vector (see the
+ /// \c Query constructor).
+ const std::vector<isc::dns::RRType>& A_AND_AAAA() const {
+ return (a_and_aaaa_);
+ }
+
+ std::vector<isc::dns::RRType> a_and_aaaa_;
};
}
More information about the bind10-changes
mailing list