summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/ntpd/refclock_as2201.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/ntpd/refclock_as2201.c')
-rw-r--r--contrib/ntp/ntpd/refclock_as2201.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/ntp/ntpd/refclock_as2201.c b/contrib/ntp/ntpd/refclock_as2201.c
index 516f7ad..f04d417b 100644
--- a/contrib/ntp/ntpd/refclock_as2201.c
+++ b/contrib/ntp/ntpd/refclock_as2201.c
@@ -299,12 +299,13 @@ as2201_receive(
/*
* Timecode format: "yy:ddd:hh:mm:ss.mmm"
*/
- if (sscanf(pp->a_lastcode, "%2d:%3d:%2d:%2d:%2d.%3d", &pp->year,
- &pp->day, &pp->hour, &pp->minute, &pp->second, &pp->msec)
+ if (sscanf(pp->a_lastcode, "%2d:%3d:%2d:%2d:%2d.%3ld", &pp->year,
+ &pp->day, &pp->hour, &pp->minute, &pp->second, &pp->nsec)
!= 6) {
refclock_report(peer, CEVNT_BADREPLY);
return;
}
+ pp->nsec *= 1000000;
/*
* Test for synchronization (this is a temporary crock).
OpenPOWER on IntegriCloud