]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Retry name resolving before marking sources online
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 28 Apr 2010 13:44:07 +0000 (15:44 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 28 Apr 2010 13:45:05 +0000 (15:45 +0200)
ntp_sources.c

index b7151f228fd3fcda3a02f00cb237ef7aaae92515..01a1b045996dbaed870ed905a8a855b3f3c7dcfb 100644 (file)
@@ -385,6 +385,13 @@ NSR_TakeSourcesOnline(IPAddr *mask, IPAddr *address)
   int i;
   int any;
 
+  /* Try to resolve unresolved sources now */
+  if (resolving_interval) {
+    SCH_RemoveTimeout(resolving_id);
+    resolving_interval--;
+    resolve_sources(NULL);
+  }
+
   any = 0;
   for (i=0; i<N_RECORDS; i++) {
     if (records[i].remote_addr) {
@@ -396,13 +403,6 @@ NSR_TakeSourcesOnline(IPAddr *mask, IPAddr *address)
     }
   }
 
-  if (resolving_interval) {
-    /* Try to resolve any unresolved sources now */
-    SCH_RemoveTimeout(resolving_id);
-    resolving_interval--;
-    resolve_sources(NULL);
-  }
-
   return any;
 }