]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add comments about the prupose of the added arguments to make{UDP,TCP}ServerSockets 14942/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 10 Dec 2024 09:20:58 +0000 (10:20 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 10 Dec 2024 09:22:46 +0000 (10:22 +0100)
pdns/recursordist/pdns_recursor.cc
pdns/recursordist/rec-main.cc
pdns/recursordist/rec-tcp.cc

index f395ad7acadfa622224416d07b6b72ddacc01e30..8ea9286171303b6d61ad327f33e40ac8187a4e3e 100644 (file)
@@ -2682,6 +2682,7 @@ static void handleNewUDPQuestion(int fileDesc, FDMultiplexer::funcparam_t& /* va
   t_Counters.updateSnap(g_regressionTestMode);
 }
 
+// The two last arguments to makeUDPServerSockets are used for logging purposes only
 unsigned int makeUDPServerSockets(deferredAdd_t& deferredAdds, Logr::log_t log, bool doLog, unsigned int instances)
 {
   int one = 1;
index b06a55c04dda1d2fb945a3e3607b0fc69acadb68..315f534df2c154c8a355e417f74525e4e00900d1 100644 (file)
@@ -1891,6 +1891,7 @@ static unsigned int initDistribution(Logr::log_t log)
       for (unsigned int i = 0; i < RecThreadInfo::numDistributors(); i++, threadNum++) {
         auto& info = RecThreadInfo::info(threadNum);
         auto& deferredAdds = info.getDeferredAdds();
+        // The two last arguments to make{UDP,TCP}ServerSockets are used for logging purposes only, same for calls below
         count += makeUDPServerSockets(deferredAdds, log, i == RecThreadInfo::numDistributors() - 1, RecThreadInfo::numDistributors());
       }
     }
index 5fc4ec5d4a5f74dd2b65f4cd4b903d7ebb04ddb6..eeb4b59983316e32172a83f628447870122ae4fd 100644 (file)
@@ -1086,6 +1086,7 @@ LWResult::Result arecvtcp(PacketBuffer& data, const size_t len, shared_ptr<TCPIO
   return LWResult::Result::Success;
 }
 
+// The two last arguments to makeTCPServerSockets are used for logging purposes only
 unsigned int makeTCPServerSockets(deferredAdd_t& deferredAdds, std::set<int>& tcpSockets, Logr::log_t log, bool doLog, unsigned int instances)
 {
   vector<string> localAddresses;