From: Chris Hofstaedtler Date: Wed, 10 Aug 2022 12:54:18 +0000 (+0200) Subject: Rename g_udpReceivers to s_udpReceivers X-Git-Tag: rec-4.8.0-alpha1~20^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fcab180dad765004e403f59c350ec002e1168351;p=thirdparty%2Fpdns.git Rename g_udpReceivers to s_udpReceivers --- diff --git a/pdns/auth-main.cc b/pdns/auth-main.cc index 8f99619d6f..cfecb378f8 100644 --- a/pdns/auth-main.cc +++ b/pdns/auth-main.cc @@ -126,7 +126,7 @@ static double avg_latency{0.0}, receive_latency{0.0}, cache_latency{0.0}, backen static unique_ptr s_tcpNameserver{nullptr}; static vector g_distributors; static shared_ptr s_udpNameserver{nullptr}; -static vector> g_udpReceivers; +static vector> s_udpReceivers; NetmaskGroup g_proxyProtocolACL; size_t g_proxyProtocolMaximumSize; @@ -559,7 +559,7 @@ try { // If we have SO_REUSEPORT then create a new port for all receiver threads // other than the first one. if (s_udpNameserver->canReusePort()) { - NS = g_udpReceivers[num]; + NS = s_udpReceivers[num]; if (NS == nullptr) { NS = s_udpNameserver; } @@ -1447,15 +1447,15 @@ int main(int argc, char** argv) } s_udpNameserver = std::make_shared(); // this fails when we are not root, throws exception - g_udpReceivers.push_back(s_udpNameserver); + s_udpReceivers.push_back(s_udpNameserver); size_t rthreads = ::arg().asNum("receiver-threads", 1); if (rthreads > 1 && s_udpNameserver->canReusePort()) { - g_udpReceivers.resize(rthreads); + s_udpReceivers.resize(rthreads); for (size_t idx = 1; idx < rthreads; idx++) { try { - g_udpReceivers[idx] = std::make_shared(true); + s_udpReceivers[idx] = std::make_shared(true); } catch (const PDNSException& e) { g_log << Logger::Error << "Unable to reuse port, falling back to original bind" << endl;