From: Chris Hofstaedtler Date: Wed, 3 Aug 2022 19:49:52 +0000 (+0200) Subject: auth: rename TN to s_tcpNameserver and make static X-Git-Tag: rec-4.8.0-alpha1~20^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6738003ecb7313fda1672a71c283f7c4f652d5af;p=thirdparty%2Fpdns.git auth: rename TN to s_tcpNameserver and make static --- diff --git a/pdns/auth-main.cc b/pdns/auth-main.cc index 49ef12d5e9..65fb75b6c2 100644 --- a/pdns/auth-main.cc +++ b/pdns/auth-main.cc @@ -123,7 +123,7 @@ std::unique_ptr DP{nullptr}; static std::unique_ptr dl{nullptr}; CommunicatorClass Communicator; static double avg_latency{0.0}, receive_latency{0.0}, cache_latency{0.0}, backend_latency{0.0}, send_latency{0.0}; -unique_ptr TN; +static unique_ptr s_tcpNameserver{nullptr}; static vector g_distributors; static shared_ptr s_udpNameserver{nullptr}; static vector> g_udpReceivers; @@ -356,7 +356,7 @@ static uint64_t getSysUserTimeMsec(const std::string& str) static uint64_t getTCPConnectionCount(const std::string& str) { - return TN->numTCPConnections(); + return s_tcpNameserver->numTCPConnections(); } static uint64_t getQCount(const std::string& str) @@ -853,7 +853,7 @@ static void mainthread() if (::arg().mustDo("primary") || ::arg().mustDo("secondary") || !::arg()["forward-notify"].empty()) Communicator.go(); - TN->go(); // tcp nameserver launch + s_tcpNameserver->go(); // tcp nameserver launch unsigned int max_rthreads = ::arg().asNum("receiver-threads", 1); g_distributors.resize(max_rthreads); @@ -1464,7 +1464,7 @@ int main(int argc, char** argv) } } - TN = make_unique(); + s_tcpNameserver = make_unique(); } catch (const ArgException& A) { g_log << Logger::Error << "Fatal error: " << A.reason << endl; diff --git a/pdns/auth-main.hh b/pdns/auth-main.hh index 47d7ecd1b6..5d194dc368 100644 --- a/pdns/auth-main.hh +++ b/pdns/auth-main.hh @@ -42,7 +42,6 @@ extern AuthPacketCache PC; //!< This is the main PacketCache, shared across all extern AuthQueryCache QC; extern std::unique_ptr DP; extern CommunicatorClass Communicator; -extern std::unique_ptr TN; extern bool g_anyToTcp; extern bool g_8bitDNS; extern NetmaskGroup g_proxyProtocolACL;