From: Harlan Stenn Date: Tue, 16 May 2000 03:38:28 +0000 (-0000) Subject: Many files: X-Git-Tag: NTP_4_0_99_J~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=286d0c735801fd43dc66bdcf12df10973548b700;p=thirdparty%2Fntp.git Many files: * 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): sys_maxfreq -> MAXFREQ Per Dave Mills. bk: 3920c2b4kLNGHNqv892ZGvewpZei5A --- diff --git a/ChangeLog b/ChangeLog index c96247c6a..9b94d8dbb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-05-15 Harlan Stenn + + * 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): + sys_maxfreq -> MAXFREQ + Per Dave Mills. + 2000-05-14 Harlan Stenn * acinclude.m4: Typo... diff --git a/include/ntp_stdlib.h b/include/ntp_stdlib.h index 092af3811..d10f67946 100644 --- a/include/ntp_stdlib.h +++ b/include/ntp_stdlib.h @@ -153,7 +153,5 @@ extern HANDLE hServDoneEvent; /* systime.c */ extern int systime_10ms_ticks; /* adj sysclock in 10ms increments */ -extern double sys_maxfreq; /* max frequency correction */ - /* version.c */ extern const char *Version; /* version declaration */ diff --git a/libntp/systime.c b/libntp/systime.c index 43aaefd0b..05f4460b4 100644 --- a/libntp/systime.c +++ b/libntp/systime.c @@ -36,7 +36,6 @@ int systime_10ms_ticks = 0; /* adj sysclock in 10ms increments */ * clock. */ double sys_residual = 0; /* residual from previous adjustment */ -double sys_maxfreq = MAXFREQ; /* max frequency correction */ /* @@ -140,8 +139,8 @@ adj_systime( } } else #endif - if (dtemp > sys_maxfreq) - dtemp = sys_maxfreq; + if (dtemp > MAXFREQ) + dtemp = MAXFREQ; dtemp = dtemp * 1e6 + .5; diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c index 88f61bf17..0ad99dbfb 100644 --- a/ntpd/ntp_loopfilter.c +++ b/ntpd/ntp_loopfilter.c @@ -537,10 +537,10 @@ local_clock( */ etemp = clock_frequency + flladj + plladj; drift_comp += etemp; - if (drift_comp > sys_maxfreq) - drift_comp = sys_maxfreq; - else if (drift_comp <= -sys_maxfreq) - drift_comp = -sys_maxfreq; + if (drift_comp > MAXFREQ) + drift_comp = MAXFREQ; + else if (drift_comp <= -MAXFREQ) + drift_comp = -MAXFREQ; 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 > sys_maxfreq) - drift_comp = sys_maxfreq; - if (drift_comp < -sys_maxfreq) - drift_comp = -sys_maxfreq; + if (drift_comp > MAXFREQ) + drift_comp = MAXFREQ; + if (drift_comp < -MAXFREQ) + drift_comp = -MAXFREQ; #ifdef KERNEL_PLL /* * If the phase-lock code is implemented in the kernel, diff --git a/ntpd/ntp_util.c b/ntpd/ntp_util.c index df4d5003d..21604fe9c 100644 --- a/ntpd/ntp_util.c +++ b/ntpd/ntp_util.c @@ -352,7 +352,7 @@ stats_config( } (void) fclose(fp); if ( !finite(old_drift) - || (fabs(old_drift) > (sys_maxfreq * 1e6))) { + || (fabs(old_drift) > (MAXFREQ * 1e6))) { msyslog(LOG_ERR, "invalid frequency (%f) in %s", old_drift, stats_drift_file); exit(1); diff --git a/ports/winnt/ntpd/nt_clockstuff.c b/ports/winnt/ntpd/nt_clockstuff.c index 63fa662ba..b66da8823 100644 --- a/ports/winnt/ntpd/nt_clockstuff.c +++ b/ports/winnt/ntpd/nt_clockstuff.c @@ -7,7 +7,6 @@ #include "ntp_timer.h" extern double sys_residual; /* residual from previous adjustment */ -extern double sys_maxfreq; static long last_Adj = 0; @@ -53,8 +52,8 @@ adj_systime( dtemp = -dtemp; } - if (dtemp > sys_maxfreq) - dtemp = sys_maxfreq; + if (dtemp > MAXFREQ) + dtemp = MAXFREQ; dtemp = dtemp * 1e6;