|
|
@ -1,4 +1,4 @@ |
|
|
|
/* $OpenBSD: ntp.c,v 1.71 2006/05/26 00:33:16 henning Exp $ */ |
|
|
|
/* $OpenBSD: ntp.c,v 1.72 2006/05/27 18:32:00 henning Exp $ */ |
|
|
|
|
|
|
|
/* |
|
|
|
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> |
|
|
@ -76,7 +76,7 @@ ntp_main(int pipe_prnt[2], struct ntpd_conf *nconf) |
|
|
|
struct ntp_sensor *s, *next_s; |
|
|
|
struct timespec tp; |
|
|
|
struct stat stb; |
|
|
|
time_t nextaction; |
|
|
|
time_t nextaction, last_sensor_scan = 0; |
|
|
|
void *newp; |
|
|
|
|
|
|
|
switch (pid = fork()) { |
|
|
@ -149,7 +149,6 @@ ntp_main(int pipe_prnt[2], struct ntpd_conf *nconf) |
|
|
|
conf->scale = 1; |
|
|
|
|
|
|
|
sensor_init(conf); |
|
|
|
sensor_scan(conf); |
|
|
|
|
|
|
|
log_info("ntp engine ready"); |
|
|
|
|
|
|
@ -232,6 +231,10 @@ ntp_main(int pipe_prnt[2], struct ntpd_conf *nconf) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (last_sensor_scan + SENSOR_SCAN_INTERVAL < time(NULL)) { |
|
|
|
sensor_scan(conf); |
|
|
|
last_sensor_scan = time(NULL); |
|
|
|
} |
|
|
|
sensors_cnt = 0; |
|
|
|
TAILQ_FOREACH(s, &conf->ntp_sensors, entry) { |
|
|
|
sensors_cnt++; |
|
|
|