Skip to content

Commit

Permalink
ixfrdist: clang-tidy cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
chbruyand committed Feb 9, 2024
1 parent 13ccdb7 commit 37d09f7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pdns/ixfrdist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#include <dirent.h>
#include <queue>
#include <condition_variable>
#include <thread>

Check warning on line 40 in pdns/ixfrdist.cc

View workflow job for this annotation

GitHub Actions / Analyze (cpp, auth)

duplicate include (readability-duplicate-include - Level=Warning)
#include <chrono>
#include "ixfr.hh"
#include "ixfrutils.hh"
#include "axfr-retriever.hh"
Expand Down Expand Up @@ -317,7 +319,7 @@ static void communicatorReceiveNotificationAnswers(const int sock4, const int so
{
std::set<int> fds = {sock4, sock6};
ComboAddress from;
std::array<char, 1500> buffer;
std::array<char, 1500> buffer{};
int sock{-1};

// receive incoming notification answers on the nonblocking sockets and take them off the list
Expand All @@ -341,7 +343,7 @@ static void communicatorReceiveNotificationAnswers(const int sock4, const int so
}

if (g_notificationQueue.lock()->removeIf(from, packet.d.id, packet.qdomain)) {
g_log << Logger::Notice << "Removed from notification list: '" << packet.qdomain << "' to " << from.toStringWithPort() << " " << (packet.d.rcode ? RCode::to_s(packet.d.rcode) : "(was acknowledged)") << endl;
g_log << Logger::Notice << "Removed from notification list: '" << packet.qdomain << "' to " << from.toStringWithPort() << " " << (packet.d.rcode != 0 ? RCode::to_s(packet.d.rcode) : "(was acknowledged)") << endl;
}
else {
g_log << Logger::Warning << "Received spurious notify answer for '" << packet.qdomain << "' from " << from.toStringWithPort() << endl;
Expand Down Expand Up @@ -379,7 +381,7 @@ static void communicatorThread()
}
communicatorReceiveNotificationAnswers(sock4, sock6);
communicatorSendNotifications(sock4, sock6);
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
}
closesocket(sock4);
closesocket(sock6);
Expand Down Expand Up @@ -1467,6 +1469,7 @@ struct IXFRDistConfiguration
bool shouldExit{false};
};

// NOLINTNEXTLINE(readability-function-cognitive-complexity)
static std::optional<IXFRDistConfiguration> parseConfiguration(int argc, char** argv, FDMultiplexer& fdm)
{
IXFRDistConfiguration configuration;
Expand Down

0 comments on commit 37d09f7

Please sign in to comment.