]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Reformat
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 6 Sep 2022 09:22:02 +0000 (11:22 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 28 Sep 2022 09:33:11 +0000 (11:33 +0200)
pdns/fstrm_logger.hh
pdns/rec_channel_rec.cc
pdns/recursordist/rec-main.cc
pdns/recursordist/rec-main.hh

index 2b1d69036b00491c5f9144ecfb41077932e85864..c2187602a333d1291eaf42737ce0d9c63ea4b2a7 100644 (file)
@@ -58,8 +58,8 @@ public:
   {
     return Stats{.d_queued = d_framesSent,
                  .d_pipeFull = d_queueFullDrops,
-                 .d_otherError = d_permanentFailures,
-                 .d_tooLarge = 0
+                 .d_tooLarge = 0,
+                 .d_otherError = d_permanentFailures
     };
   }
 
index 942a2b9dfe9b3acb06249eefd98a14ab84197bf1..e4d9d7e5ea9124fa16798ce40e801f1c0d69aa07 100644 (file)
@@ -993,7 +993,7 @@ static void remoteLoggerStats(const string& type, const RemoteLoggerStats_t& sta
   if (stats.empty()) {
     return;
   }
-  for (const auto& [key, entry]: stats) {
+  for (const auto& [key, entry] : stats) {
     os << entry.d_queued << '\t' << entry.d_pipeFull << '\t' << entry.d_tooLarge << '\t' << entry.d_otherError << '\t' << key << '\t' << type << endl;
   }
 }
@@ -1268,7 +1268,7 @@ static StatsMap toRemoteLoggerStatsMap(const string& name)
   auto stats2 = broadcastAccFunction<RemoteLoggerStats_t>(pleaseGetOutgoingRemoteLoggerStats);
   auto stats3 = broadcastAccFunction<RemoteLoggerStats_t>(pleaseGetFramestreamLoggerStats);
   uint64_t count = 0;
-  for (const auto& [stats, type] : { make_pair(stats1, "protobuf") , make_pair(stats2, "outgoingProtobuf"), make_pair(stats3, "dnstapFrameStream") } ) {
+  for (const auto& [stats, type] : {make_pair(stats1, "protobuf"), make_pair(stats2, "outgoingProtobuf"), make_pair(stats3, "dnstapFrameStream")}) {
     for (const auto& [key, entry] : stats) {
       auto keyname = pbasename + "{address=\"" + key + "\",type=\"" + type + "\",count=\"";
       auto sname1 = name + "-q-" + std::to_string(count);
@@ -2347,7 +2347,7 @@ RecursorControlChannel::Answer RecursorControlParser::getAnswer(int s, const str
     return {0, doGetProxyMappingStats()};
   }
   if (cmd == "get-remotelogger-stats") {
-    return {0, getRemoteLoggerStats() };
+    return {0, getRemoteLoggerStats()};
   }
 
   return {1, "Unknown command '" + cmd + "', try 'help'\n"};
index 1b41bbfa0c8a2738e0ff6ec8b64f973554ef0e71..741db6c5ad8957214df213fee22d02ee69feda2d 100644 (file)
@@ -1294,7 +1294,7 @@ static ProxyMappingStats_t& operator+=(ProxyMappingStats_t& a, const ProxyMappin
   return a;
 }
 
-static RemoteLoggerStats_t& operator+=(RemoteLoggerStats_t &a, const RemoteLoggerStats_t& b)
+static RemoteLoggerStats_t& operator+=(RemoteLoggerStats_ta, const RemoteLoggerStats_t& b)
 {
   for (const auto& [key, entry] : b) {
     a[key] += entry;
index 59ead712916a2526f988d98597e3acdfc19fcb71..fe5ce18d6535b2bd3011444edc520627d09a0e07 100644 (file)
@@ -190,7 +190,6 @@ extern thread_local std::unique_ptr<RecursorPacketCache> t_packetCache;
 
 using RemoteLoggerStats_t = std::unordered_map<std::string, RemoteLoggerInterface::Stats>;
 
-
 extern bool g_logCommonErrors;
 extern size_t g_proxyProtocolMaximumSize;
 extern std::atomic<bool> g_quiet;