From: Harlan Stenn Date: Tue, 12 Sep 2006 08:03:30 +0000 (-0400) Subject: WWV refclock fixes from Dave Mills X-Git-Tag: NTP_4_2_3P45~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08c1c93b3d56465c200f239be3ee81c6b1c623f3;p=thirdparty%2Fntp.git WWV refclock fixes from Dave Mills bk: 450669d2bb3hozLsv5al9bab0kDYPA --- diff --git a/ntpd/refclock_wwv.c b/ntpd/refclock_wwv.c index 3477ed57b..cfc94b1b4 100644 --- a/ntpd/refclock_wwv.c +++ b/ntpd/refclock_wwv.c @@ -1459,14 +1459,17 @@ wwv_endpoc( * If the epoch candidate is the same as the last one, increment * the run counter. If not, save the length, epoch and end * time of the current run for use later and reset the counter. - * If the run is at least SCMP (10) s, the SSYNC bit is lit and - * the epoch considered valid for synchronization. + * The epoch is considered valid if the run is at least SCMP + * (10) s, the minute is synchronized and the interval since the + * last epoch is not greater than the averaging interval. Thus, + * after a long absence, the program will wait a full averaging + * interval while the integrator charges up. */ tmp2 = (tepoch - xepoch) % SECOND; if (tmp2 == 0) { syncnt++; - if (syncnt > SCMP && up->status & MSYNC && up->status & - FGATE) { + if (syncnt > SCMP && up->status & MSYNC && (up->status & + FGATE || scount - zcount <= up->avgint)) { up->status |= SSYNC; up->yepoch = tepoch; }