]> granicus.if.org Git - pdns/commitdiff
dnsdist: Constify more members of TCPClientCollection, DownstreamState
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 28 May 2018 21:11:22 +0000 (23:11 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 28 May 2018 21:11:22 +0000 (23:11 +0200)
pdns/dnsdist.hh

index e478a09cf656ad9b49426d76431f12beef8421e8..9bca6dcd2dd0669d6b1460555b840992f4b42ed5 100644 (file)
@@ -433,10 +433,10 @@ class TCPClientCollection {
   std::atomic<uint64_t> d_numthreads{0};
   std::atomic<uint64_t> d_pos{0};
   std::atomic<uint64_t> 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<IDState> 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};