[svn] commit: r3847 - in /branches/trac422/src/bin/auth: query.cc tests/query_unittest.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Dec 15 03:29:56 UTC 2010
Author: chenzhengzhang
Date: Wed Dec 15 03:29:56 2010
New Revision: 3847
Log:
fix a bug (which occurs due to the change of ZoneTable)
Modified:
branches/trac422/src/bin/auth/query.cc
branches/trac422/src/bin/auth/tests/query_unittest.cc
Modified: branches/trac422/src/bin/auth/query.cc
==============================================================================
--- branches/trac422/src/bin/auth/query.cc (original)
+++ branches/trac422/src/bin/auth/query.cc Wed Dec 15 03:29:56 2010
@@ -26,10 +26,10 @@
namespace auth {
void
Query::process() const {
- const ZoneTable::FindResult result = zone_table_.find(qname_);
+ const ZoneTable::FindResult result = zone_table_.findZone(qname_);
- if (result.code != ZoneTable::SUCCESS &&
- result.code != ZoneTable::PARTIALMATCH) {
+ if (result.code != isc::datasrc::result::SUCCESS &&
+ result.code != isc::datasrc::result::PARTIALMATCH) {
response_.setRcode(Rcode::SERVFAIL());
return;
}
Modified: branches/trac422/src/bin/auth/tests/query_unittest.cc
==============================================================================
--- branches/trac422/src/bin/auth/tests/query_unittest.cc (original)
+++ branches/trac422/src/bin/auth/tests/query_unittest.cc Wed Dec 15 03:29:56 2010
@@ -55,7 +55,7 @@
TEST_F(QueryTest, matchZone) {
// add a matching zone. since the zone is empty right now, the response
// should have NXDOMAIN.
- zone_table.add(ZonePtr(new MemoryZone(qclass, Name("example.com"))));
+ zone_table.addZone(ZonePtr(new MemoryZone(qclass, Name("example.com"))));
query.process();
EXPECT_EQ(Rcode::NXDOMAIN(), response.getRcode());
}
@@ -63,7 +63,7 @@
TEST_F(QueryTest, noMatchZone) {
// there's a zone in the table but it doesn't match the qname. should
// result in SERVFAIL.
- zone_table.add(ZonePtr(new MemoryZone(qclass, Name("example.org"))));
+ zone_table.addZone(ZonePtr(new MemoryZone(qclass, Name("example.org"))));
query.process();
EXPECT_EQ(Rcode::SERVFAIL(), response.getRcode());
}
More information about the bind10-changes
mailing list