diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2006-08-19 16:56:55 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2006-08-19 16:56:55 +0000 |
commit | b77d22d0e2d6fa18f16f6afe2c7cdb8323104827 (patch) | |
tree | 292baa479801d4d89bdd1f5d808d25489082a6c7 /usr.sbin | |
parent | d607a2d2d4073bb5a7874ed3133a620eef312ce9 (diff) |
make sure updates from sensors have the "synced" flag set
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ntpd/sensors.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/ntpd/sensors.c b/usr.sbin/ntpd/sensors.c index a43097e6b20..ee8a0c31229 100644 --- a/usr.sbin/ntpd/sensors.c +++ b/usr.sbin/ntpd/sensors.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sensors.c,v 1.20 2006/06/30 16:52:13 deraadt Exp $ */ +/* $OpenBSD: sensors.c,v 1.21 2006/08/19 16:56:54 henning Exp $ */ /* * Copyright (c) 2006 Henning Brauer <henning@openbsd.org> @@ -157,14 +157,16 @@ sensor_query(struct ntp_sensor *s) return; memcpy(&refid, "HARD", sizeof(refid)); - s->update.status.refid = htonl(refid); s->update.offset = 0 - (float)sensor.value / 1000000000.0; + s->update.rcvd = sensor.tv.tv_sec; + s->update.good = 1; + + s->update.status.refid = htonl(refid); s->update.status.stratum = 0; /* increased when sent out */ s->update.status.rootdelay = 0; s->update.status.rootdispersion = 0; s->update.status.reftime = sensor.tv.tv_sec; - s->update.rcvd = sensor.tv.tv_sec; - s->update.good = 1; + s->update.status.synced = 1; log_debug("sensor %s: offset %f", s->device, s->update.offset); } |