summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ntpd/ntpd.h4
-rw-r--r--usr.sbin/ntpd/sensors.c16
2 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/ntpd/ntpd.h b/usr.sbin/ntpd/ntpd.h
index f438ec5bcf6..1f80c383d8f 100644
--- a/usr.sbin/ntpd/ntpd.h
+++ b/usr.sbin/ntpd/ntpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntpd.h,v 1.93 2008/06/09 16:37:35 ckuethe Exp $ */
+/* $OpenBSD: ntpd.h,v 1.94 2008/06/09 18:30:48 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -140,7 +140,7 @@ struct ntp_sensor {
time_t next;
time_t last;
char *device;
- u_int32_t refstr;
+ u_int32_t refid;
int sensordevid;
int correction;
u_int8_t weight;
diff --git a/usr.sbin/ntpd/sensors.c b/usr.sbin/ntpd/sensors.c
index c7d4f94b33e..0307681fbc0 100644
--- a/usr.sbin/ntpd/sensors.c
+++ b/usr.sbin/ntpd/sensors.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sensors.c,v 1.38 2008/06/09 18:30:03 deraadt Exp $ */
+/* $OpenBSD: sensors.c,v 1.39 2008/06/09 18:30:48 deraadt Exp $ */
/*
* Copyright (c) 2006 Henning Brauer <henning@openbsd.org>
@@ -128,17 +128,17 @@ sensor_add(int sensordev, char *dxname)
s->sensordevid = sensordev;
if (cs->refstr == NULL)
- memcpy(&s->refstr, "HARD", sizeof(s->refstr));
+ memcpy(&s->refid, "HARD", sizeof(s->refid));
else {
- s->refstr = 0;
- strncpy((char *)&s->refstr, cs->refstr, sizeof(s->refstr));
+ s->refid = 0;
+ strncpy((char *)&s->refid, cs->refstr, sizeof(s->refid));
}
TAILQ_INSERT_TAIL(&conf->ntp_sensors, s, entry);
log_debug("sensor %s added (weight %d, correction %.6f, refstr %-4s)",
- s->device, s->weight, s->correction / 1e6, &s->refstr);
- s->refstr = htonl(s->refstr);
+ s->device, s->weight, s->correction / 1e6, &s->refid);
+ s->refid = htonl(s->refid);
}
void
@@ -190,8 +190,8 @@ sensor_query(struct ntp_sensor *s)
s->offsets[s->shift].rcvd = sensor.tv.tv_sec;
s->offsets[s->shift].good = 1;
- s->offsets[s->shift].status.refid = s->refstr;
- s->offsets[s->shift].status.refid4 = s->refstr;
+ s->offsets[s->shift].status.refid = s->refid;
+ s->offsets[s->shift].status.refid4 = s->refid;
s->offsets[s->shift].status.stratum = 0; /* increased when sent out */
s->offsets[s->shift].status.rootdelay = 0;
s->offsets[s->shift].status.rootdispersion = 0;