]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Tidy up style nits
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Mon, 10 May 2021 08:12:59 +0000 (10:12 +0200)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Sat, 15 May 2021 22:45:45 +0000 (00:45 +0200)
pdns/auth-domaincache.cc
pdns/common_startup.cc
pdns/ueberbackend.cc

index 8c5959dffdd45e58974d0b9eb9a681a36adf544c..df86df84837ced47b39db20694caf2146a2126a5 100644 (file)
@@ -33,8 +33,8 @@ extern StatBag S;
 AuthDomainCache::AuthDomainCache(size_t mapsCount) :
   d_maps(mapsCount)
 {
-  S.declare("domain-cache-hit", "Number of hits on the domain cache");
-  S.declare("domain-cache-miss", "Number of misses on the domain cache");
+  S.declare("domain-cache-hit", "Number of domain cache hits");
+  S.declare("domain-cache-miss", "Number of domain cache misses");
   S.declare("domain-cache-size", "Number of entries in the domain cache", StatType::gauge);
 
   d_statnumhit = S.getPointer("domain-cache-hit");
@@ -109,7 +109,7 @@ void AuthDomainCache::replace(const vector<tuple<DNSName, int>>& domain_indices)
   {
     WriteLock globalLock(d_mut);
     if (d_replacePending) {
-      // add/replace all domains created while data collection for replace() was already running.
+      // add/replace all domains created while data collection for replace() was already in progress.
       for (const tuple<DNSName, int>& tup : d_pendingAdds) {
         const DNSName& domain = tup.get<0>();
         CacheValue val;
index 82ca91a4ffc383e3452fea735724c3714890651f..dfbb2dd473f873df24c657962a4d6a83d28c57f6 100644 (file)
@@ -181,7 +181,7 @@ void declareArguments()
   ::arg().set("cache-ttl","Seconds to store packets in the PacketCache")="20";
   ::arg().set("negquery-cache-ttl","Seconds to store negative query results in the QueryCache")="60";
   ::arg().set("query-cache-ttl","Seconds to store query results in the QueryCache")="20";
-  ::arg().set("domain-cache-ttl","Seconds to cache list of known domains")="0";
+  ::arg().set("domain-cache-ttl", "Seconds to cache list of known domains") = "0";
   ::arg().set("server-id", "Returned when queried for 'id.server' TXT or NSID, defaults to hostname - disabled or custom")="";
   ::arg().set("default-soa-content","Default SOA content")="a.misconfigured.dns.server.invalid hostmaster.@ 0 10800 3600 604800 3600";
   ::arg().set("default-soa-edit","Default SOA-EDIT value")="";
@@ -682,10 +682,10 @@ void mainthread()
   uint32_t secpollSince = 0;
   uint32_t domainCacheUpdateSince = 0;
   for(;;) {
-    const uint32_t slept = g_domainCache.getTTL() == 0 ? secpollInterval : std::min(secpollInterval, g_domainCache.getTTL());
-    sleep(slept);  // if any signals arrive, we might run more often than expected.
+    const uint32_t sleeptime = g_domainCache.getTTL() == 0 ? secpollInterval : std::min(secpollInterval, g_domainCache.getTTL());
+    sleep(sleeptime);  // if any signals arrive, we might run more often than expected.
 
-    domainCacheUpdateSince += slept;
+    domainCacheUpdateSince += sleeptime;
     if (domainCacheUpdateSince >= g_domainCache.getTTL()) {
       try {
         UeberBackend B;
@@ -700,7 +700,7 @@ void mainthread()
       }
     }
 
-    secpollSince += slept;
+    secpollSince += sleeptime;
     if (secpollSince >= secpollInterval) {
       secpollSince = 0;
       try {
index 6aa13fe69569628904bb47da66fb3e9679e8cf4f..15e4221e87a85e4248fa3e7d7d513c785ba33fd1 100644 (file)
@@ -357,7 +357,7 @@ bool UeberBackend::getAuth(const DNSName &target, const QType& qtype, SOAData* s
     int zoneId{-1};
     if(cachedOk && g_domainCache.isEnabled()) {
       if (g_domainCache.getEntry(shorter, zoneId)) {
-        // Zone exists in domain cache, directly lookup SOA.
+        // Zone exists in domain cache, directly look up SOA.
         // XXX: this code path and the cache lookup below should be merged; but that needs the code path below to also use ANY.
         // Or it should just also use lookup().
         DNSZoneRecord zr;