diff options
author | 2005-06-19 17:11:13 +0000 | |
---|---|---|
committer | 2005-06-19 17:11:13 +0000 | |
commit | 9fb4a489810ea77b492d47d0fe18e3a44cdcd918 (patch) | |
tree | b4c7fedf237f3c49535feef7bc89c80bf69cc2c6 | |
parent | rev 1.4 (diff) | |
download | wireguard-openbsd-9fb4a489810ea77b492d47d0fe18e3a44cdcd918.tar.xz wireguard-openbsd-9fb4a489810ea77b492d47d0fe18e3a44cdcd918.zip |
use a #define for the time to wait on -s and clarify a log msg
-rw-r--r-- | usr.sbin/ntpd/ntpd.c | 8 | ||||
-rw-r--r-- | usr.sbin/ntpd/ntpd.h | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c index 8cbf68c1c2a..a46918b2d1b 100644 --- a/usr.sbin/ntpd/ntpd.c +++ b/usr.sbin/ntpd/ntpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.c,v 1.37 2005/06/19 16:42:57 henning Exp $ */ +/* $OpenBSD: ntpd.c,v 1.38 2005/06/19 17:11:13 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -131,7 +131,7 @@ main(int argc, char *argv[]) if (daemon(1, 0)) fatal("daemon"); } else - timeout = 15 * 1000; + timeout = SETTIME_TIMEOUT * 1000; if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_chld) == -1) fatal("socketpair"); @@ -168,8 +168,8 @@ main(int argc, char *argv[]) conf.settime = 0; timeout = INFTIM; log_init(conf.debug); - log_debug("no reply received, skipping initial time " - "setting"); + log_debug("no reply received in time, skipping initial " + "time setting"); if (!conf.debug) if (daemon(1, 0)) fatal("daemon"); diff --git a/usr.sbin/ntpd/ntpd.h b/usr.sbin/ntpd/ntpd.h index 2952415de90..fe6598a7c32 100644 --- a/usr.sbin/ntpd/ntpd.h +++ b/usr.sbin/ntpd/ntpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.h,v 1.56 2005/06/19 16:42:57 henning Exp $ */ +/* $OpenBSD: ntpd.h,v 1.57 2005/06/19 17:11:13 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -55,6 +55,7 @@ #define QUERYTIME_MAX 15 /* single query might take n secs max */ #define OFFSET_ARRAY_SIZE 8 #define SETTIME_MIN_OFFSET 180 /* min offset for settime at start */ +#define SETTIME_TIMEOUT 15 /* max seconds to wait with -s */ #define LOG_NEGLIGEE 128 /* negligible drift to not log (ms) */ enum client_state { |