From: Chris Hofstaedtler Date: Mon, 8 Feb 2021 12:33:47 +0000 (+0100) Subject: Move extern AuthDomainCache into auth-domaincache.hh X-Git-Tag: auth-4.5.0-alpha1~7^2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4deb1a4e71955ea54df2755953b1ab170558f6e4;p=thirdparty%2Fpdns.git Move extern AuthDomainCache into auth-domaincache.hh --- diff --git a/modules/bindbackend/bindbackend2.cc b/modules/bindbackend/bindbackend2.cc index 3f826feb84..0010a2a9b2 100644 --- a/modules/bindbackend/bindbackend2.cc +++ b/modules/bindbackend/bindbackend2.cc @@ -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. diff --git a/pdns/auth-domaincache.hh b/pdns/auth-domaincache.hh index bee0202f97..8240e94238 100644 --- a/pdns/auth-domaincache.hh +++ b/pdns/auth-domaincache.hh @@ -21,13 +21,8 @@ */ #pragma once #include -#include -#include "dns.hh" - #include - -#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; diff --git a/pdns/common_startup.hh b/pdns/common_startup.hh index 4e82e8f032..6e49e861bd 100644 --- a/pdns/common_startup.hh +++ b/pdns/common_startup.hh @@ -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 DP; extern std::unique_ptr dl; extern CommunicatorClass Communicator; diff --git a/pdns/test-ueberbackend_cc.cc b/pdns/test-ueberbackend_cc.cc index c8fc32708e..84cbb9bbd6 100644 --- a/pdns/test-ueberbackend_cc.cc +++ b/pdns/test-ueberbackend_cc.cc @@ -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 func) { - extern AuthDomainCache g_domainCache; extern AuthQueryCache QC; { diff --git a/pdns/ueberbackend.cc b/pdns/ueberbackend.cc index e34b875066..ab57415aed 100644 --- a/pdns/ueberbackend.cc +++ b/pdns/ueberbackend.cc @@ -48,7 +48,6 @@ #include "logger.hh" #include "statbag.hh" -extern AuthDomainCache g_domainCache; extern StatBag S; vectorUeberBackend::instances;