From: Harlan Stenn Date: Mon, 31 Oct 2005 10:26:54 +0000 (-0500) Subject: fixes from Dave Mills X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63262ccd756bd76cc396f15e63b99b46a0517ffb;p=thirdparty%2Fntp.git fixes from Dave Mills bk: 4365f16eUynQFNQ54lrXBFe9xgL6fA --- diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c index 2527bd7dd5..1e887e1a3d 100644 --- a/ntpd/ntp_loopfilter.c +++ b/ntpd/ntp_loopfilter.c @@ -558,7 +558,11 @@ local_clock( struct tm *tm = NULL; time_t tstamp; +#ifdef STA_NANO + ntv.modes = MOD_BITS | MOD_NANO; +#else /* STA_NANO */ ntv.modes = MOD_BITS; +#endif /* STA_NANO */ if (clock_offset < 0) dtemp = -.5; else @@ -603,7 +607,8 @@ local_clock( printf( "local_clock: leap %d status %x date %d/%d\n", leap_next, ntv.status, - tm->tm_mon + 1, tm->tm_mday); + tm->tm_mon + 1, + tm->tm_mday); #endif } @@ -871,8 +876,8 @@ loop_config( #ifdef KERNEL_PLL /* * Assume the kernel supports the ntp_adjtime() syscall. - * If that syscall works, initialize the kernel - * variables. Otherwise, continue leaving no harm + * If that syscall works, initialize the kernel time + * variables. Otherwise, continue leaving no harm * behind. While at it, ask to set nanosecond mode. If * the kernel agrees, rejoice; othewise, it does only * microseconds. @@ -923,8 +928,8 @@ loop_config( #endif /* SIGSYS */ /* - * Save the result status and light up nanoseconds - * and/or an external clock if available. + * Save the result status and light up an external clock + * if available. */ pll_status = ntv.status; if (pll_control) { diff --git a/ntpd/refclock_wwv.c b/ntpd/refclock_wwv.c index 3ea702d427..e77609be98 100644 --- a/ntpd/refclock_wwv.c +++ b/ntpd/refclock_wwv.c @@ -79,7 +79,7 @@ #define MAXCLP 100 /* max clips above reference per s */ #define MAXERR 10 /* max data bit errors in minute */ #define MAXSNR 40. /* max SNR reference */ -#define MAXFREQ 1. /* max frequency tolerance (125 PPM) */ +#define MAXFREQ 1.5 /* max frequency tolerance (187 PPM) */ #define PI 3.1415926535 /* the real thing */ #define DATCYC 170 /* data filter cycles */ #define DATSIZ (DATCYC * MS) /* data filter size */