* Add detection of Linux 2.5
* Allow arbitrary value of HZ in Linux kernel
* Fix for chrony.spec on SuSE (Paul Elliot)
+* Fix handling of initstepslew if no servers are listed (John Hasler)
New in version 1.19
===================
John Hasler <john@dhh.gt.org>
Changes to support 64 bit machines (i.e. those where
- sizeof(unsigned long) > 4)
+ sizeof(unsigned long) > 4)
+ Bug fix to initstepslew directive
Liam Hatton <me@liamhatton.com>
Advice on configuring for Linux on PPC
Version control information
===========================
-$Header: /cvs/src/chrony/README,v 1.27 2003/07/01 20:56:23 richard Exp $
+$Header: /cvs/src/chrony/README,v 1.28 2003/09/19 22:44:06 richard Exp $
vim:tw=72
/*
- $Header: /cvs/src/chrony/conf.c,v 1.42 2003/03/27 23:45:47 richard Exp $
+ $Header: /cvs/src/chrony/conf.c,v 1.43 2003/09/19 22:44:06 richard Exp $
=======================================================================
const char *p;
char hostname[HOSTNAME_LEN+1];
int n;
+ int threshold;
unsigned long ip_addr;
- do_init_stepslew = 1;
n_init_srcs = 0;
p = line;
- if (sscanf(p, "%d%n", &init_slew_threshold, &n) == 1) {
+ if (sscanf(p, "%d%n", &threshold, &n) == 1) {
p += n;
} else {
LOG(LOGS_WARN, LOGF_Configure, "Could not parse initstepslew threshold at line %d", line_number);
- init_slew_threshold = -1;
return;
}
-
while (*p) {
if (sscanf(p, "%" SHOSTNAME_LEN "s%n", hostname, &n) == 1) {
ip_addr = DNS_Name2IPAddress(hostname);
}
if (n_init_srcs >= MAX_INIT_SRCS) {
- return;
+ break;
}
} else {
/* If we get invalid trailing syntax, forget it ... */
- return;
+ break;
}
-
p += n;
}
-
+ if (n_init_srcs > 0) {
+ do_init_stepslew = 1;
+ init_slew_threshold = threshold;
+ } else {
+ LOG(LOGS_WARN, LOGF_Configure, "No usable initstepslew servers at line %d\n", line_number);
+ }
}
/* ================================================== */