BIND 10 trac2432, updated. bbb8a8f0ed42862b7e5b54e7611cb0d0e364203b [2432] Use RRCollator during RRsetCollection construction (zone-loading)
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Jan 3 11:49:33 UTC 2013
The branch, trac2432 has been updated
via bbb8a8f0ed42862b7e5b54e7611cb0d0e364203b (commit)
from ee424bbc727b754b8030fb2adaa69c578f096de9 (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 bbb8a8f0ed42862b7e5b54e7611cb0d0e364203b
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Jan 3 17:18:45 2013 +0530
[2432] Use RRCollator during RRsetCollection construction (zone-loading)
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/rrset_collection.cc | 16 ++++------------
src/lib/dns/rrset_collection.h | 3 ---
2 files changed, 4 insertions(+), 15 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dns/rrset_collection.cc b/src/lib/dns/rrset_collection.cc
index a16e529..0c804a7 100644
--- a/src/lib/dns/rrset_collection.cc
+++ b/src/lib/dns/rrset_collection.cc
@@ -15,6 +15,7 @@
#include <dns/rrset_collection.h>
#include <dns/master_loader_callbacks.h>
#include <dns/master_loader.h>
+#include <dns/rrcollator.h>
#include <exceptions/exceptions.h>
@@ -32,16 +33,6 @@ RRsetCollection::loaderCallback(const std::string&, size_t, const std::string&)
}
void
-RRsetCollection::addRRset(const Name& name, const RRClass& rrclass,
- const RRType& rrtype, const RRTTL& rrttl,
- const rdata::RdataPtr& data)
-{
- RRsetPtr rrset(new BasicRRset(name, rrclass, rrtype, rrttl));
- rrset->addRdata(data);
- addRRset(rrset);
-}
-
-void
RRsetCollection::addRRset(RRsetPtr rrset) {
const CollectionKey key(rrset->getClass(), rrset->getType(),
rrset->getName());
@@ -60,14 +51,15 @@ void
RRsetCollection::constructHelper(T source, const isc::dns::Name& origin,
const isc::dns::RRClass& rrclass)
{
+ RRCollator collator(boost::bind(&RRsetCollection::addRRset, this, _1));
MasterLoaderCallbacks callbacks
(boost::bind(&RRsetCollection::loaderCallback, this, _1, _2, _3),
boost::bind(&RRsetCollection::loaderCallback, this, _1, _2, _3));
MasterLoader loader(source, origin, rrclass, callbacks,
- boost::bind(&RRsetCollection::addRRset,
- this, _1, _2, _3, _4, _5),
+ collator.getCallback(),
MasterLoader::DEFAULT);
loader.load();
+ collator.flush();
}
RRsetCollection::RRsetCollection(const char* filename, const Name& origin,
diff --git a/src/lib/dns/rrset_collection.h b/src/lib/dns/rrset_collection.h
index 1456f9f..bc1d185 100644
--- a/src/lib/dns/rrset_collection.h
+++ b/src/lib/dns/rrset_collection.h
@@ -121,9 +121,6 @@ private:
template<typename T>
void constructHelper(T source, const isc::dns::Name& origin,
const isc::dns::RRClass& rrclass);
- void addRRset(const isc::dns::Name& name, const isc::dns::RRClass& rrclass,
- const isc::dns::RRType& rrtype, const isc::dns::RRTTL& rrttl,
- const isc::dns::rdata::RdataPtr& data);
void loaderCallback(const std::string&, size_t, const std::string&);
typedef boost::tuple<isc::dns::RRClass, isc::dns::RRType, isc::dns::Name>
More information about the bind10-changes
mailing list