From eea91760aeb870a3d44c83a41b7a7966244c5766 Mon Sep 17 00:00:00 2001 From: henning <> Date: Wed, 31 May 2006 01:27:21 +0000 Subject: [PATCH] only actually run sensor_query when it is due, not every time poll returns --- src/usr.sbin/ntpd/ntp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/usr.sbin/ntpd/ntp.c b/src/usr.sbin/ntpd/ntp.c index 0bf8bc27..3d395637 100644 --- a/src/usr.sbin/ntpd/ntp.c +++ b/src/usr.sbin/ntpd/ntp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntp.c,v 1.77 2006/05/28 20:39:16 henning Exp $ */ +/* $OpenBSD: ntp.c,v 1.78 2006/05/31 01:27:21 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -297,7 +297,8 @@ ntp_main(int pipe_prnt[2], struct ntpd_conf *nconf) for (s = TAILQ_FIRST(&conf->ntp_sensors); s != NULL; s = next_s) { next_s = TAILQ_NEXT(s, entry); - sensor_query(s); + if (s->next <= time(NULL)) + sensor_query(s); } }