Log if we don't update a service when switching from offline to online, otherwise...
[bpdyndnsd] / src / updater.cpp
index eddcc48..028a152 100644 (file)
@@ -215,8 +215,9 @@ void Updater::init_log_facility() const
 
 /**
  * Update all configured services.
+ * @param changed_to_online True if we just changed to online, false if we were already online
  */
-void Updater::update_services() const
+void Updater::update_services(bool changed_to_online) const
 {
     // Get all services from the ServiceHolder.
     list<Service::Ptr> services = ServiceHolder->get_services();
@@ -254,7 +255,7 @@ void Updater::update_services() const
         // Test if the actual DNS-Record differs from the host's IP.
         if (ip_host == ip_dns_recheck )
         {
-            Log->print_no_update_needed(hostname, ip_dns_recheck, ip_last_update, ip_host, lastupdated);
+            Log->print_no_update_needed(changed_to_online, hostname, ip_dns_recheck, ip_last_update, ip_host, lastupdated);
             // No update needed
             continue;
         }
@@ -279,7 +280,7 @@ void Updater::update_services() const
             else
             {
                 // DNS cache TTL isn't expired
-                Log->print_update_service_ttl_not_expired(hostname, ip_dns_recheck, ip_last_update, ip_host, lastupdated, dns_cache_ttl, current_time);
+                Log->print_update_service_ttl_not_expired(changed_to_online, hostname, ip_dns_recheck, ip_last_update, ip_host, lastupdated, dns_cache_ttl, current_time);
             }
         }
     }