From: Otto Moerbeek Date: Mon, 25 Mar 2024 11:31:26 +0000 (+0100) Subject: Remove changes var and releted method, they are unused X-Git-Tag: rec-5.1.0-alpha1~82^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a41f37e325725df75e61a18e13c8fb402565921;p=thirdparty%2Fpdns.git Remove changes var and releted method, they are unused --- diff --git a/pdns/recursordist/rec-system-resolve.cc b/pdns/recursordist/rec-system-resolve.cc index 07e60e71b7..682f6ee2a2 100644 --- a/pdns/recursordist/rec-system-resolve.cc +++ b/pdns/recursordist/rec-system-resolve.cc @@ -229,12 +229,6 @@ bool pdns::RecResolve::refresh(time_t now) return updated; } -bool pdns::RecResolve::changeDetected() -{ - bool change = d_refresher.changes.exchange(false); - return change; -} - pdns::RecResolve::Refresher::Refresher(time_t interval, const std::function& callback, pdns::RecResolve& res) : d_resolver(res), d_callback(callback), d_interval(std::max(static_cast(1), interval)) { @@ -275,11 +269,10 @@ void pdns::RecResolve::Refresher::refreshLoop() log->info(Logr::Error, "id.server/CH/TXT resolves to my own server identity", "id.server", Logging::Loggable(resolvedServerID)); } } - changes = d_resolver.refresh(time(nullptr)); + bool changes = d_resolver.refresh(time(nullptr)); wakeTime = time(nullptr); if (changes) { d_callback(); - changes = false; } } } diff --git a/pdns/recursordist/rec-system-resolve.hh b/pdns/recursordist/rec-system-resolve.hh index d70d27ed3b..2a50ca22e2 100644 --- a/pdns/recursordist/rec-system-resolve.hh +++ b/pdns/recursordist/rec-system-resolve.hh @@ -93,8 +93,6 @@ public: void startRefresher(); // Wipe one or all names void wipe(const std::string& name = ""); - // Did we see a change? Calling this function will reset the flag. - bool changeDetected(); private: bool refresh(time_t now); @@ -125,8 +123,6 @@ private: void finish(); void trigger(); - std::atomic changes{false}; - private: void refreshLoop();