From: Harlan Stenn Date: Tue, 26 Feb 2002 09:01:55 +0000 (-0500) Subject: Apparently, the TPRO refclock didn't get updated when the refclockproc X-Git-Tag: NTP_4_1_73~185^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ef14bbf5242b76818fa0718b4053038bc5f106a9;p=thirdparty%2Fntp.git Apparently, the TPRO refclock didn't get updated when the refclockproc structure changed the usec member to nsec. Fix it now. bk: 3c7b4f03F8tgxjnptCvGdVkuv5nrMQ --- diff --git a/ntpd/refclock_tpro.c b/ntpd/refclock_tpro.c index a4b2e6ee0a..3c425684ec 100644 --- a/ntpd/refclock_tpro.c +++ b/ntpd/refclock_tpro.c @@ -164,6 +164,11 @@ tpro_poll( * can't use the sec/usec conversion produced by the driver, * since the year may be suspect. All format error checking is * done by the sprintf() and sscanf() routines. + * + * Note that the refclockproc usec member has now become nsec. + * We could either multiply the read-in usec value by 1000 or + * we could pad the written string appropriately and read the + * resulting value in already scaled. */ sprintf(pp->a_lastcode, "%1x%1x%1x %1x%1x:%1x%1x:%1x%1x.%1x%1x%1x%1x%1x%1x %1x", @@ -179,11 +184,12 @@ tpro_poll( pp->a_lastcode); #endif if (sscanf(pp->a_lastcode, "%3d %2d:%2d:%2d.%6ld", &pp->day, - &pp->hour, &pp->minute, &pp->second, &pp->usec) + &pp->hour, &pp->minute, &pp->second, &pp->nsec) != 5) { refclock_report(peer, CEVNT_BADTIME); return; } + pp->nsec *= 1000; /* Convert usec to nsec */ if (!tp->status & 0x3) pp->leap = LEAP_NOTINSYNC; else