diff --git a/src/usr.sbin/ntpd/ntpd.c b/src/usr.sbin/ntpd/ntpd.c index 8cbf68c1..a46918b2 100644 --- a/src/usr.sbin/ntpd/ntpd.c +++ b/src/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 @@ -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/src/usr.sbin/ntpd/ntpd.h b/src/usr.sbin/ntpd/ntpd.h index 2952415d..fe6598a7 100644 --- a/src/usr.sbin/ntpd/ntpd.h +++ b/src/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 @@ -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 {