Browse Source

[2276] Change order of arguments to createFindResult()

"... because it's more consistent with other functions/methods that
take both a node and rdataset, and because it would be the more natural
order if we consider the pair of them as an RRset."
Mukund Sivaraman 12 years ago
parent
commit
ae20aca3d9
1 changed files with 9 additions and 9 deletions
  1. 9 9
      src/lib/datasrc/memory/zone_finder.cc

+ 9 - 9
src/lib/datasrc/memory/zone_finder.cc

@@ -238,8 +238,8 @@ ZoneFinderResultContext
 createFindResult(const RRClass& rrclass,
 createFindResult(const RRClass& rrclass,
                  const ZoneData& zone_data,
                  const ZoneData& zone_data,
                  ZoneFinder::Result code,
                  ZoneFinder::Result code,
-                 const RdataSet* rdataset,
                  const ZoneNode* node,
                  const ZoneNode* node,
+                 const RdataSet* rdataset,
                  ZoneFinder::FindOptions options,
                  ZoneFinder::FindOptions options,
                  bool wild = false,
                  bool wild = false,
                  const Name* qname = NULL)
                  const Name* qname = NULL)
@@ -724,7 +724,7 @@ InMemoryZoneFinder::findInternal(const isc::dns::Name& name,
         findNode(zone_data_, LabelSequence(name), node_path, options);
         findNode(zone_data_, LabelSequence(name), node_path, options);
     if (node_result.code != SUCCESS) {
     if (node_result.code != SUCCESS) {
         return (createFindResult(rrclass_, zone_data_, node_result.code,
         return (createFindResult(rrclass_, zone_data_, node_result.code,
-                                 node_result.rdataset, node_result.node,
+                                 node_result.node, node_result.rdataset,
                                  options));
                                  options));
     }
     }
 
 
@@ -743,7 +743,7 @@ InMemoryZoneFinder::findInternal(const isc::dns::Name& name,
         ConstNodeRRset nsec_rrset = getClosestNSEC(zone_data_, node_path,
         ConstNodeRRset nsec_rrset = getClosestNSEC(zone_data_, node_path,
                                                    options);
                                                    options);
         return (createFindResult(rrclass_, zone_data_, NXRRSET,
         return (createFindResult(rrclass_, zone_data_, NXRRSET,
-                                 nsec_rrset.second, nsec_rrset.first,
+                                 nsec_rrset.first, nsec_rrset.second,
                                  options, wild));
                                  options, wild));
     }
     }
 
 
@@ -763,7 +763,7 @@ InMemoryZoneFinder::findInternal(const isc::dns::Name& name,
             LOG_DEBUG(logger, DBG_TRACE_DATA,
             LOG_DEBUG(logger, DBG_TRACE_DATA,
                       DATASRC_MEM_EXACT_DELEGATION).arg(name);
                       DATASRC_MEM_EXACT_DELEGATION).arg(name);
             return (createFindResult(rrclass_, zone_data_, DELEGATION,
             return (createFindResult(rrclass_, zone_data_, DELEGATION,
-                                     found, node, options, wild, &name));
+                                     node, found, options, wild, &name));
         }
         }
     }
     }
 
 
@@ -778,7 +778,7 @@ InMemoryZoneFinder::findInternal(const isc::dns::Name& name,
         }
         }
         LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_ANY_SUCCESS).
         LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_ANY_SUCCESS).
             arg(name);
             arg(name);
-        return (createFindResult(rrclass_, zone_data_, SUCCESS, NULL, node,
+        return (createFindResult(rrclass_, zone_data_, SUCCESS, node, NULL,
                                  options, wild, &name));
                                  options, wild, &name));
     }
     }
 
 
@@ -787,7 +787,7 @@ InMemoryZoneFinder::findInternal(const isc::dns::Name& name,
         // Good, it is here
         // Good, it is here
         LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_SUCCESS).arg(name).
         LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_SUCCESS).arg(name).
             arg(type);
             arg(type);
-        return (createFindResult(rrclass_, zone_data_, SUCCESS, found, node,
+        return (createFindResult(rrclass_, zone_data_, SUCCESS, node, found,
                                  options, wild, &name));
                                  options, wild, &name));
     } else {
     } else {
         // Next, try CNAME.
         // Next, try CNAME.
@@ -795,14 +795,14 @@ InMemoryZoneFinder::findInternal(const isc::dns::Name& name,
         if (found != NULL) {
         if (found != NULL) {
 
 
             LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_CNAME).arg(name);
             LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_CNAME).arg(name);
-            return (createFindResult(rrclass_, zone_data_, CNAME, found, node,
+            return (createFindResult(rrclass_, zone_data_, CNAME, node, found,
                                      options, wild, &name));
                                      options, wild, &name));
         }
         }
     }
     }
     // No exact match or CNAME.  Get NSEC if necessary and return NXRRSET.
     // No exact match or CNAME.  Get NSEC if necessary and return NXRRSET.
-    return (createFindResult(rrclass_, zone_data_, NXRRSET,
+    return (createFindResult(rrclass_, zone_data_, NXRRSET, node,
                              getNSECForNXRRSET(zone_data_, options, node),
                              getNSECForNXRRSET(zone_data_, options, node),
-                             node, options, wild, &name));
+                             options, wild, &name));
 }
 }
 
 
 isc::datasrc::ZoneFinder::FindNSEC3Result
 isc::datasrc::ZoneFinder::FindNSEC3Result