From: Remi Gacogne Date: Mon, 28 May 2018 21:11:22 +0000 (+0200) Subject: dnsdist: Constify more members of TCPClientCollection, DownstreamState X-Git-Tag: dnsdist-1.3.1~51^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=734027757e22a34db53d7528098e997632b762e6;p=pdns dnsdist: Constify more members of TCPClientCollection, DownstreamState --- diff --git a/pdns/dnsdist.hh b/pdns/dnsdist.hh index e478a09cf..9bca6dcd2 100644 --- a/pdns/dnsdist.hh +++ b/pdns/dnsdist.hh @@ -433,10 +433,10 @@ class TCPClientCollection { std::atomic d_numthreads{0}; std::atomic d_pos{0}; std::atomic d_queued{0}; - uint64_t d_maxthreads{0}; + const uint64_t d_maxthreads{0}; std::mutex d_mutex; int d_singlePipe[2]; - bool d_useSinglePipe; + const bool d_useSinglePipe; public: TCPClientCollection(size_t maxThreads, bool useSinglePipe=false): d_maxthreads(maxThreads), d_singlePipe{-1,-1}, d_useSinglePipe(useSinglePipe) @@ -506,7 +506,7 @@ struct DownstreamState const ComboAddress remote; QPSLimiter qps; vector idStates; - ComboAddress sourceAddr; + const ComboAddress sourceAddr; checkfunc_t checkFunction; DNSName checkName{"a.root-servers.net."}; QType checkType{QType::A}; @@ -531,7 +531,7 @@ struct DownstreamState int tcpConnectTimeout{5}; int tcpRecvTimeout{30}; int tcpSendTimeout{30}; - unsigned int sourceItf{0}; + const unsigned int sourceItf{0}; uint16_t retries{5}; uint16_t xpfRRCode{0}; uint8_t currentCheckFailures{0};