]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Move extern AuthDomainCache into auth-domaincache.hh
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Mon, 8 Feb 2021 12:33:47 +0000 (13:33 +0100)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Sat, 15 May 2021 22:45:45 +0000 (00:45 +0200)
modules/bindbackend/bindbackend2.cc
pdns/auth-domaincache.hh
pdns/common_startup.hh
pdns/test-ueberbackend_cc.cc
pdns/ueberbackend.cc

index 3f826feb847ef52de8ce4d7677d4d11e6da0108f..0010a2a9b2239c25bac90cf81ae3a782bac3fb84 100644 (file)
@@ -55,8 +55,6 @@
 #include "pdns/lock.hh"
 #include "pdns/auth-domaincache.hh"
 
-extern AuthDomainCache g_domainCache;
-
 /* 
    All instances of this backend share one s_state, which is indexed by zone name and zone id.
    The s_state is protected by a read/write lock, and the goal it to only interact with it briefly.
index bee0202f97be61558eda2ed304351084eb34133c..8240e9423865121575effaa2e0c5932ff2602aa3 100644 (file)
  */
 #pragma once
 #include <string>
-#include <map>
-#include "dns.hh"
-
 #include <unordered_map>
-
-#include "dns.hh"
-#include "dnspacket.hh"
+#include "dnsname.hh"
 #include "lock.hh"
 
 class AuthDomainCache : public boost::noncopyable
@@ -91,3 +86,5 @@ private:
 
   time_t d_ttl;
 };
+
+extern AuthDomainCache g_domainCache;
index 4e82e8f03210493a4c4180d6c9eb7ce1c219b373..6e49e861bd3d6d2471f16d38e0794288c85a2d27 100644 (file)
@@ -39,7 +39,6 @@ extern ArgvMap theArg;
 extern StatBag S;  //!< Statistics are gathered across PDNS via the StatBag class S
 extern AuthPacketCache PC; //!< This is the main PacketCache, shared across all threads
 extern AuthQueryCache QC;
-extern AuthDomainCache g_domainCache;
 extern std::unique_ptr<DNSProxy> DP;
 extern std::unique_ptr<DynListener> dl;
 extern CommunicatorClass Communicator;
index c8fc32708e1dd24a8739d7235c39451dc2537b72..84cbb9bbd639bdbac13d0208ed93ecc7c6ee034b 100644 (file)
@@ -333,7 +333,6 @@ public:
 
 struct UeberBackendSetupArgFixture {
   UeberBackendSetupArgFixture() {
-    extern AuthDomainCache g_domainCache;
     extern AuthQueryCache QC;
     ::arg().set("query-cache-ttl")="0";
     ::arg().set("negquery-cache-ttl")="0";
@@ -349,7 +348,6 @@ struct UeberBackendSetupArgFixture {
 
 static void testWithoutThenWithCache(std::function<void(UeberBackend& ub)> func)
 {
-  extern AuthDomainCache g_domainCache;
   extern AuthQueryCache QC;
 
   {
index e34b875066a4f494a8922919db1d2176966a3c7d..ab57415aed63a8df155e1cfc450c0dfe2184b344 100644 (file)
@@ -48,7 +48,6 @@
 #include "logger.hh"
 #include "statbag.hh"
 
-extern AuthDomainCache g_domainCache;
 extern StatBag S;
 
 vector<UeberBackend *>UeberBackend::instances;