[svn] commit: r955 - in /branches/each-ds/src/lib: auth/cpp/data_source.cc auth/cpp/data_source_sqlite3.cc auth/cpp/data_source_sqlite3.h dns/cpp/rrsetlist.h
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Feb 25 00:35:54 UTC 2010
Author: each
Date: Thu Feb 25 00:35:54 2010
New Revision: 955
Log:
- bad idea to reuse REFERRAL enum value in two places
- put additional data in a generic vector<RRsetPtr> insted of
an RRsetList (because those are only supposed to have one entry
per type)
Modified:
branches/each-ds/src/lib/auth/cpp/data_source.cc
branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.cc
branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.h
branches/each-ds/src/lib/dns/cpp/rrsetlist.h
Modified: branches/each-ds/src/lib/auth/cpp/data_source.cc
==============================================================================
--- branches/each-ds/src/lib/auth/cpp/data_source.cc (original)
+++ branches/each-ds/src/lib/auth/cpp/data_source.cc Thu Feb 25 00:35:54 2010
@@ -1,4 +1,5 @@
#include <iostream>
+#include <vector>
#include <dns/buffer.h>
#include <dns/message.h>
@@ -11,6 +12,7 @@
#include "data_source.h"
+using namespace std;
using namespace isc::dns;
using namespace isc::dns::rdata;
@@ -295,7 +297,7 @@
DataSrc::doQuery(Query q) {
Result result;
Message& m = q.message();
- RRsetList additional;
+ vector<RRsetPtr> additional;
// XXX: this is for testing purposes; it should be done when
// parsing the message for EDNS0 options
@@ -330,7 +332,7 @@
const DataSrc* ds = match.bestDataSrc();
const Name* zone = match.closestName();
- if (ds != NULL) {
+ if (ds) {
task.zone = new Name(*zone);
// For these query task types, if there is more than
@@ -338,8 +340,7 @@
// check the intermediate nodes for referrals.
if ((task.op == QueryTask::AUTH_QUERY ||
task.op == QueryTask::NOGLUE_QUERY) &&
- hasDelegation(ds, q, task))
- {
+ hasDelegation(ds, q, task)) {
continue;
}
@@ -403,7 +404,7 @@
rrset->getType() == q.qtype()) {
continue;
}
- additional.addRRset(rrset);
+ additional.push_back(rrset);
}
continue;
Modified: branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.cc
==============================================================================
--- branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.cc (original)
+++ branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.cc Thu Feb 25 00:35:54 2010
@@ -84,7 +84,7 @@
case ADDRESS:
query = q_addrs;
break;
- case REFERRAL:
+ case DELEGATION:
query = q_referral;
break;
default:
@@ -159,8 +159,8 @@
// found a CNAME when looking for something else (other than NSEC
// or ANY)
- if (strcmp(type, "CNAME") == 0 && strcmp(c_rdtype, "CNAME") != 0 &&
- (rdtype != RRType::NSEC() && rdtype != RRType::ANY())) {
+ if (strcmp(type, "CNAME") == 0 && rdtype != RRType::CNAME() &&
+ rdtype != RRType::NSEC() && rdtype != RRType::ANY()) {
flags |= CNAME_FOUND;
}
@@ -545,7 +545,7 @@
RRsetList& target,
uint32_t& flags,
Name* zone) const {
- findRecords(qname, RRType::ANY(), target, zone, REFERRAL, flags);
+ findRecords(qname, RRType::ANY(), target, zone, DELEGATION, flags);
return (SUCCESS);
}
//
Modified: branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.h
==============================================================================
--- branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.h (original)
+++ branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.h Thu Feb 25 00:35:54 2010
@@ -75,7 +75,7 @@
enum Mode {
NORMAL,
ADDRESS,
- REFERRAL
+ DELEGATION
};
void open(const std::string& name);
Modified: branches/each-ds/src/lib/dns/cpp/rrsetlist.h
==============================================================================
--- branches/each-ds/src/lib/dns/cpp/rrsetlist.h (original)
+++ branches/each-ds/src/lib/dns/cpp/rrsetlist.h Thu Feb 25 00:35:54 2010
@@ -19,7 +19,6 @@
#include <iostream>
#include <vector>
-#include <map>
#include <boost/shared_ptr.hpp>
More information about the bind10-changes
mailing list