summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2006-06-01 05:44:36 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2006-06-01 05:44:36 +0000
commitd78bff0d5ddd61e109cea0a9ececf41c89c6af59 (patch)
tree1346a8c342b5fb7d97cbf9729bd514e9b3214c97
parentadf0a824da6d4e09e46e59ff7fddf80a6928c00e (diff)
urgs, other stuff snuck in
-rw-r--r--usr.sbin/ntpd/ntp.c15
-rw-r--r--usr.sbin/ntpd/sensors.c3
2 files changed, 2 insertions, 16 deletions
diff --git a/usr.sbin/ntpd/ntp.c b/usr.sbin/ntpd/ntp.c
index 2a9abed46ae..1e2c2271ae6 100644
--- a/usr.sbin/ntpd/ntp.c
+++ b/usr.sbin/ntpd/ntp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntp.c,v 1.79 2006/06/01 04:42:23 henning Exp $ */
+/* $OpenBSD: ntp.c,v 1.80 2006/06/01 05:44:35 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -429,27 +429,18 @@ priv_adjtime(void)
int offset_cnt = 0, i = 0, j;
struct ntp_offset **offsets;
double offset_median;
- u_int8_t priority = 0;
TAILQ_FOREACH(p, &conf->ntp_peers, entry) {
if (p->trustlevel < TRUSTLEVEL_BADPEER)
continue;
if (!p->update.good)
return;
- if (p->priority > priority) {
- priority = p->priority;
- offset_cnt = 0;
- }
offset_cnt += p->weight;
}
TAILQ_FOREACH(s, &conf->ntp_sensors, entry) {
if (!s->update.good)
continue;
- if (s->priority > priority) {
- priority = s->priority;
- offset_cnt = 0;
- }
offset_cnt += p->weight;
}
@@ -459,8 +450,6 @@ priv_adjtime(void)
TAILQ_FOREACH(p, &conf->ntp_peers, entry) {
if (p->trustlevel < TRUSTLEVEL_BADPEER)
continue;
- if (p->priority < priority)
- continue;
for (j = 0; j < p->weight; j++)
offsets[i++] = &p->update;
}
@@ -468,8 +457,6 @@ priv_adjtime(void)
TAILQ_FOREACH(s, &conf->ntp_sensors, entry) {
if (!s->update.good)
continue;
- if (s->priority < priority)
- continue;
for (j = 0; j < s->weight; j++)
offsets[i++] = &s->update;
}
diff --git a/usr.sbin/ntpd/sensors.c b/usr.sbin/ntpd/sensors.c
index a9d40493a28..205a93c3950 100644
--- a/usr.sbin/ntpd/sensors.c
+++ b/usr.sbin/ntpd/sensors.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sensors.c,v 1.17 2006/06/01 04:44:23 henning Exp $ */
+/* $OpenBSD: sensors.c,v 1.18 2006/06/01 05:44:35 henning Exp $ */
/*
* Copyright (c) 2006 Henning Brauer <henning@openbsd.org>
@@ -102,7 +102,6 @@ sensor_add(struct sensor *sensor)
s->next = time(NULL);
s->weight = cs->weight;
- s->priority = cs->priority;
if ((s->device = strdup(sensor->device)) == NULL)
fatal("sensor_add strdup");
s->sensorid = sensor->num;