]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Many files:
authorHarlan Stenn <stenn@ntp.org>
Tue, 16 May 2000 04:55:34 +0000 (04:55 -0000)
committerHarlan Stenn <stenn@ntp.org>
Tue, 16 May 2000 04:55:34 +0000 (04:55 -0000)
  * include/ntp_stdlib.h:
  * libntp/systime.c (adj_systime):
  * ntpd/ntp_loopfilter.c (loop_config):
  * ntpd/ntp_util.c (stats_config):
  * ports/winnt/ntpd/nt_clockstuff.c (adj_systime):
  MAXFREQ -> MAX_FREQ
  * include/ntp_proto.h: Define MAX_FREQ

bk: 3920d4c6Uu6DeMufuqYb8UVgJdeWrA

ChangeLog
include/ntp.h
include/ntp_proto.h
libntp/systime.c
ntpd/ntp_loopfilter.c
ntpd/ntp_util.c
ports/winnt/ntpd/nt_clockstuff.c

index 9b94d8dbbfb8605106380a5e228f518ff1484361..a88e215a23fb83359d4f8264202bd8ad07e09bd4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2000-05-16  Harlan Stenn  <stenn@whimsy.udel.edu>
+
+       * include/ntp_stdlib.h: 
+       * libntp/systime.c (adj_systime): 
+       * ntpd/ntp_loopfilter.c (loop_config): 
+       * ntpd/ntp_util.c (stats_config): 
+       * ports/winnt/ntpd/nt_clockstuff.c (adj_systime): 
+       MAXFREQ -> MAX_FREQ
+       * include/ntp_proto.h: Define MAX_FREQ
+
 2000-05-15  Harlan Stenn  <stenn@whimsy.udel.edu>
 
        * include/ntp_stdlib.h: 
index e8cbde12e930d48d658ed86eb4cda70c6f924427..d8341e75d8f0c975f428db9c92100623364239dc 100644 (file)
@@ -115,7 +115,7 @@ typedef char s_char;
 #define CLOCK_SGATE    10.     /* popcorn spike gate */
 #define BURST_INTERVAL1        4       /* first interburst interval (log2) */
 #define BURST_INTERVAL2        1       /* succeeding interburst intervals (log2) */
+
 /*
  * Operations for jitter (variance) calculations (these use doubles).
  *
index 2a888c2cc2574371ceec24e4b5e9fdd4a88e0e06..0ea7a9b436583ce2f69ebbdd890a57da5278cf0b 100644 (file)
@@ -5,4 +5,6 @@
 #include <config.h>
 #endif
 
+#define MAX_FREQ       500e-6
 #endif /* __ntp_proto_h */
index 05f4460b476ee143463c4e7603e0480e4352db88..f9f9f8806715ff48b12ccb8c9684130645bda7d9 100644 (file)
@@ -19,6 +19,7 @@
 # include <utmpx.h>
 #endif /* HAVE_UTMPX_H */
 
+#include "ntp_proto.h"         /* for MAX_FREQ */
 #include "ntp_machine.h"
 #include "ntp_fp.h"
 #include "ntp_syslog.h"
@@ -27,8 +28,6 @@
 
 int    systime_10ms_ticks = 0; /* adj sysclock in 10ms increments */
 
-#define MAXFREQ 500e-6
-
 /*
  * These routines (init_systime, get_systime, step_systime, adj_systime)
  * implement an interface between the (more or less) system independent
@@ -139,8 +138,8 @@ adj_systime(
                }
        } else 
 #endif
-               if (dtemp > MAXFREQ)
-                       dtemp = MAXFREQ;
+               if (dtemp > MAX_FREQ)
+                       dtemp = MAX_FREQ;
 
        dtemp = dtemp * 1e6 + .5;
 
index 0ad99dbfb762fa3aecfe3001eb0894444474a2fc..d92158745b3fbeebb6f83bb49d8aa2dae5a1c871 100644 (file)
@@ -537,10 +537,10 @@ local_clock(
         */
        etemp = clock_frequency + flladj + plladj;
        drift_comp += etemp;
-       if (drift_comp > MAXFREQ)
-               drift_comp = MAXFREQ;
-       else if (drift_comp <= -MAXFREQ)
-               drift_comp = -MAXFREQ;
+       if (drift_comp > MAX_FREQ)
+               drift_comp = MAX_FREQ;
+       else if (drift_comp <= -MAX_FREQ)
+               drift_comp = -MAX_FREQ;
        dtemp = SQUARE(clock_stability);
        etemp = SQUARE(etemp) - dtemp;
        clock_stability = SQRT(dtemp + etemp / CLOCK_AVG);
@@ -743,10 +743,10 @@ loop_config(
                 */
                rstclock(S_FSET);
                drift_comp = freq;
-               if (drift_comp > MAXFREQ)
-                       drift_comp = MAXFREQ;
-               if (drift_comp < -MAXFREQ)
-                       drift_comp = -MAXFREQ;
+               if (drift_comp > MAX_FREQ)
+                       drift_comp = MAX_FREQ;
+               if (drift_comp < -MAX_FREQ)
+                       drift_comp = -MAX_FREQ;
 #ifdef KERNEL_PLL
                /*
                 * If the phase-lock code is implemented in the kernel,
index 21604fe9c83db5591360f5b8d8c87bfd45226061..e0ed4c60f34fe3f7f3ea2b2c5e7a01b6a92efec5 100644 (file)
@@ -352,7 +352,7 @@ stats_config(
                }
                (void) fclose(fp);
                if (   !finite(old_drift)
-                   || (fabs(old_drift) > (MAXFREQ * 1e6))) {
+                   || (fabs(old_drift) > (MAX_FREQ * 1e6))) {
                        msyslog(LOG_ERR, "invalid frequency (%f) in %s", 
                            old_drift, stats_drift_file);
                        exit(1);
index b66da88238ddc1d8ef8d5a0c0c36d526dbb5446f..26840b2988e4887f0a424b34e50c71a9caf5f289 100644 (file)
@@ -52,8 +52,8 @@ adj_systime(
                dtemp = -dtemp;
        }
 
-       if (dtemp > MAXFREQ)
-               dtemp = MAXFREQ;
+       if (dtemp > MAX_FREQ)
+               dtemp = MAX_FREQ;
 
        dtemp = dtemp * 1e6;