]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Remove changes var and releted method, they are unused
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 25 Mar 2024 11:31:26 +0000 (12:31 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 25 Mar 2024 11:31:26 +0000 (12:31 +0100)
pdns/recursordist/rec-system-resolve.cc
pdns/recursordist/rec-system-resolve.hh

index 07e60e71b705b42c78a3cb7daddef916b2f3037e..682f6ee2a21d8ec2626d696c2d5df9925f079163 100644 (file)
@@ -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<void()>& callback, pdns::RecResolve& res) :
   d_resolver(res), d_callback(callback), d_interval(std::max(static_cast<time_t>(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;
       }
     }
   }
index d70d27ed3b10dc84e1ee04197688f4ec561d5128..2a50ca22e22f2113dc7b89bb95968d63602a4402 100644 (file)
@@ -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<bool> changes{false};
-
   private:
     void refreshLoop();