Browse Source

make sure updates from sensors have the "synced" flag set

OPENBSD_4_0
henning 18 years ago
parent
commit
031b227392
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      src/usr.sbin/ntpd/sensors.c

+ 6
- 4
src/usr.sbin/ntpd/sensors.c View File

@ -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);
}


Loading…
Cancel
Save