]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Move refclock slew and dispersion handler init
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 14 Feb 2012 17:13:15 +0000 (18:13 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 14 Feb 2012 17:13:15 +0000 (18:13 +0100)
refclock.c

index 86feac7f7e16dbada91413117655ae6ebd67731a..b969afe151a6a07a0379378db8381093009b5112 100644 (file)
@@ -114,6 +114,11 @@ RCL_Initialise(void)
 {
   CNF_AddRefclocks();
 
+  if (n_sources > 0) {
+    LCL_AddParameterChangeHandler(slew_samples, NULL);
+    LCL_AddDispersionNotifyHandler(add_dispersion, NULL);
+  }
+
   logfileid = CNF_GetLogRefclocks() ? LOG_FileOpen("refclocks",
       "   Date (UTC) Time         Refid  DP L P  Raw offset   Cooked offset      Disp.")
     : -1;
@@ -268,11 +273,6 @@ RCL_StartRefclocks(void)
     } else
       inst->lock_ref = -1;
   }
-
-  if (n_sources > 0) {
-    LCL_AddParameterChangeHandler(slew_samples, NULL);
-    LCL_AddDispersionNotifyHandler(add_dispersion, NULL);
-  }
 }
 
 void