From: Bjoern Sikora Date: Mon, 12 Oct 2009 11:18:42 +0000 (+0200) Subject: Don't try to update if dynamic hostname could not be found. X-Git-Tag: v1.1~153 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=a7c1e2710320cbab3fd0ddc536943bd8fa11d986;p=bpdyndnsd Don't try to update if dynamic hostname could not be found. Changed log level for "Host not found" to warning (doesn't lead to program exit). --- diff --git a/src/logger.cpp b/src/logger.cpp index 59113e0..91d040d 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -823,7 +823,7 @@ void Logger::print_error_hostname_to_ip(const string& exception, const string& h { ostringstream msg; msg << "Could not resolve the hostname: " << hostname << " to an IP-Address: " << exception << endl; - log_error(msg.str(),level); + log_warning(msg.str(),level); } } diff --git a/src/updater.cpp b/src/updater.cpp index 3961d77..54306b4 100644 --- a/src/updater.cpp +++ b/src/updater.cpp @@ -246,8 +246,13 @@ void Updater::update_services() Log->print_cached_dns_entry(hostname, ip_dns_recheck, ip_last_update, ip_host); + // Test if the DNS-Record could not be found. + if ( ip_dns_recheck.empty() ) + { + // Next in BOOST_FOREACH + } // Test if the actual DNS-Record differs from the host's IP. - if ( ip_host != ip_dns_recheck ) + else if ( ip_host != ip_dns_recheck ) { // Check if the service will be updated for the first time. if ( lastupdated == 0 )