BIND 10 trac2218_2, updated. e5ad751d8372bb0306d4eb5b8311a7b9cb7c7c32 [2218] Rename set variable to rdataset

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Sep 21 03:18:13 UTC 2012


The branch, trac2218_2 has been updated
       via  e5ad751d8372bb0306d4eb5b8311a7b9cb7c7c32 (commit)
       via  a9fd37df7cba2f48a2f4e42cc0d1f26b991b5636 (commit)
       via  fd8264e864303a947addc8f788b31ae7c7ea4c12 (commit)
       via  65253b21b0d15b2608655e90a129efbe1de24d07 (commit)
      from  94f1fcdbcfb0cfceaff0e850df3bdd190efb73ad (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 e5ad751d8372bb0306d4eb5b8311a7b9cb7c7c32
Author: Mukund Sivaraman <muks at isc.org>
Date:   Fri Sep 21 08:47:58 2012 +0530

    [2218] Rename set variable to rdataset

commit a9fd37df7cba2f48a2f4e42cc0d1f26b991b5636
Author: Mukund Sivaraman <muks at isc.org>
Date:   Fri Sep 21 08:45:50 2012 +0530

    [2218] Rewrite Name generation to be more efficient

commit fd8264e864303a947addc8f788b31ae7c7ea4c12
Author: Mukund Sivaraman <muks at isc.org>
Date:   Fri Sep 21 08:42:42 2012 +0530

    [2218] Move some statements out of loop

commit 65253b21b0d15b2608655e90a129efbe1de24d07
Author: Mukund Sivaraman <muks at isc.org>
Date:   Fri Sep 21 08:39:51 2012 +0530

    [2218] Move expression to simplify code

-----------------------------------------------------------------------

Summary of changes:
 src/lib/datasrc/memory/zone_finder.cc |   29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/zone_finder.cc b/src/lib/datasrc/memory/zone_finder.cc
index e5785c8..07fc78e 100644
--- a/src/lib/datasrc/memory/zone_finder.cc
+++ b/src/lib/datasrc/memory/zone_finder.cc
@@ -660,32 +660,35 @@ InMemoryZoneFinder::findNSEC3(const isc::dns::Name& name, bool recursive) {
 
     // placeholder of the next closer proof
     const ZoneNode* covering_node(NULL);
+
+    const ZoneTree& tree = nsec3_data->getNSEC3Tree();
+    ZoneChain chain;
+
     // Examine all names from the query name to the origin name, stripping
     // the deepest label one by one, until we find a name that has a matching
     // NSEC3 hash.
     for (unsigned int labels = qlabels; labels >= olabels; --labels) {
-        const std::string hlabel = (nsec3_calculate_)
-            ((labels == qlabels ?
-              name : name.split(qlabels - labels, labels)),
-             nsec3_data->iterations,
-             nsec3_data->getSaltData(),
-             nsec3_data->getSaltLen());
+        const Name& hname = (labels == qlabels ?
+                             name : name.split(qlabels - labels, labels));
+        const std::string hlabel =
+            (nsec3_calculate_) (hname,
+                                nsec3_data->iterations,
+                                nsec3_data->getSaltData(),
+                                nsec3_data->getSaltLen());
 
         LOG_DEBUG(logger, DBG_TRACE_BASIC, DATASRC_MEM_FINDNSEC3_TRYHASH).
             arg(name).arg(labels).arg(hlabel);
 
-        const ZoneTree& tree = nsec3_data->getNSEC3Tree();
-
         ZoneNode* node(NULL);
-        ZoneChain chain;
-
+        chain.clear();
         const ZoneTree::Result result =
-            tree.find(Name(hlabel + "." + getOrigin().toText()), &node, chain);
+            tree.find(Name(hlabel).concatenate(getOrigin()), &node, chain);
 
         if (result == ZoneTree::EXACTMATCH) {
             // We found an exact match.
-            RdataSet* set = node->getData();
-            ConstRRsetPtr closest = createTreeNodeRRset(node, set, getClass());
+            RdataSet* rdataset = node->getData();
+            ConstRRsetPtr closest = createTreeNodeRRset(node, rdataset,
+                                                        getClass());
             ConstRRsetPtr next =
                 createTreeNodeRRset(covering_node,
                                     (covering_node != NULL ?



More information about the bind10-changes mailing list