{
Log->print_update_service(service_name);
- if ( perform_update(ip) == UpdateOk )
+ UpdateErrorCode update_res = perform_update(ip);
+
+ if (update_res == UpdateOk)
{
// if update was successful, we need to set the Lastupdated and ActualIP base member.
set_last_update(current_time,ip);
}
else
{
+ if (update_res == NoChange || update_res == Blocked)
+ {
+ // Log update for burnt IP logic and update "ActualIP" of this service
+ set_last_update(current_time,ip);
+ ActualIP = ip;
+ }
+
// problem while trying to update service
Log->print_update_service_failure(service_name);
// IP didn't change, this might indicate a problem at the
// dyndns backend or another client is running elsewhere.
get_logger()->print_update_failure(url, curl_data);
- return UpdateOk;
+ return NoChange;
}
else if (curl_data.compare(0,5,"abuse") == 0 )
{
// Account is blocked. Log it as a successful update
// so the IP address will be "burnt" until it changes.
get_logger()->print_update_failure(url, curl_data);
- return UpdateOk;
+ return Blocked;
}
else if ( curl_data == "badauth" )
{