Commit 99ca7567 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

Merge branch 'trac1796'

parents cc0fc600 fb50e3b3
......@@ -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 {
......
......@@ -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_;
};
}
......
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