Browse Source

[trac80] cleanup: replaced class-dependent find for rrsetlist with class independent one.

In this case, the behavior should be the same because the class is used
from the data source, not from the query.  This change is mainly for
consistency (but as a bonus we can get rid of an unused temporary variable).
JINMEI Tatuya 14 years ago
parent
commit
af4b7eba43
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/lib/datasrc/data_source.cc

+ 2 - 3
src/lib/datasrc/data_source.cc

@@ -956,9 +956,8 @@ DataSrc::doQuery(Query& q) {
                     // Add the NS records for the enclosing zone to
                     // the authority section.
                     RRsetList auth;
-                    const DataSrc* ds = zoneinfo.getDataSource();
-                    if (!refQuery(q, Name(*zonename), zoneinfo, auth)  ||
-                        !auth.findRRset(RRType::NS(), ds->getClass())) {
+                    if (!refQuery(q, Name(*zonename), zoneinfo, auth) ||
+                        !findRRsetFromList(auth, RRType::NS())) {
                         isc_throw(DataSourceError,
                                   "NS RR not found in " << *zonename << "/" <<
                                   q.qclass());