From: Harlan Stenn Date: Tue, 11 Jan 2000 04:33:04 +0000 (-0000) Subject: ChangeLog, refclock_wwv.c: X-Git-Tag: NTP_4_0_99~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f43e4eb45d022a98943934de2d7ff8db5ead65c9;p=thirdparty%2Fntp.git ChangeLog, refclock_wwv.c: * ntpd/refclock_wwv.c: Bugfixes/improvements From: Dave Mills bk: 387ab280iiPw1MBt-lU6omcLoOcEoA --- diff --git a/ChangeLog b/ChangeLog index 072509dbe..6de8ae8e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2000-01-10 Harlan Stenn + * ntpd/refclock_wwv.c: Bugfixes/improvements + From: Dave Mills + * configure.in: Get the quoting right on the sys_errlist check. From documentation by: Akim Demaille diff --git a/ntpd/refclock_wwv.c b/ntpd/refclock_wwv.c index 3448a5029..da831a308 100644 --- a/ntpd/refclock_wwv.c +++ b/ntpd/refclock_wwv.c @@ -1223,11 +1223,10 @@ wwv_rf( * lamp and raises an alarm. */ up->swatch++; - if (up->swatch > HSPEC) { + if (up->swatch > HSPEC) up->status &= ~SSYNC; + if (!(up->status & SSYNC)) up->alarm |= 1 << SYNERR; - up->swatch = 0; - } } } @@ -1623,9 +1622,14 @@ wwv_endpoc( * candidate is identical to the last one; otherwise, it is * forced to zero. If the compare counter increments to 10, the * epoch is reset and the receiver second epoch is set. + * + * Careful attention to detail here. If the signal amplitude + * falls below the threshold or if no stations are heard, we + * certainly cannot be in sync. */ tmp2 = MOD(tepoch - xepoch, SECOND); - if (up->epomax < STHR) { + if (up->epomax < STHR || !(up->status & (SELV | SELH))) { + up->status &= ~SSYNC; jitcnt = syncnt = avgcnt = 0; } else if (abs(tmp2) <= MS || jitcnt >= (MINAVG << up->avgint)) {