From: Thomas Jarosch Date: Thu, 14 Oct 2010 09:03:11 +0000 (+0200) Subject: Set last webcheck timestamp early so we don't trash the server in case of an error... X-Git-Tag: v1.1~49 X-Git-Url: http://developer.intra2net.com/git/?p=bpdyndnsd;a=commitdiff_plain;h=d43bb54db46664387112d05b2a9be7b5a0ff79e3 Set last webcheck timestamp early so we don't trash the server in case of an error (and keep quiet for the defined idle period) --- diff --git a/src/ip_addr_helper.cpp b/src/ip_addr_helper.cpp index 8628cb9..429356a 100644 --- a/src/ip_addr_helper.cpp +++ b/src/ip_addr_helper.cpp @@ -409,6 +409,9 @@ string IPAddrHelper::webcheck_ip(bool changed_to_online) return ""; } + // Set the LastWebcheck time to current time. + LastWebcheck = current_time; + // If perform_curl_operation returns a connection problem indicating return code, try the next ip webcheck url if there is one. while ( (curl_err_code == 1) && (url_list.size() != 0) && (url_list.front() != "") ) { @@ -451,9 +454,6 @@ string IPAddrHelper::webcheck_ip(bool changed_to_online) return ""; } - // Set the LastWebcheck time to current time. - LastWebcheck = current_time; - // If IP is within a private range then return "" if ( is_local_ipv4(ip_addr) ) {