From: Rob Neal Date: Thu, 21 Jun 2007 13:10:39 +0000 (-0400) Subject: ChangeLog, ntp_config.c: X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcd94e785414ca7d8162ddd10b38fd0390e56e98;p=thirdparty%2Fntp.git ChangeLog, ntp_config.c: [Bug 862] includefile nesting; preserve phonelist on reconfig. ntp_scanner.h: [Bug 862] includefile nesting. bk: 467a78cfBaUZRMVAw2a8wC6mLDCUqg --- diff --git a/ChangeLog b/ChangeLog index 7fb7b54042..e3aa3009e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* [Bug 862] includefile nesting; preserve phonelist on reconfig. * Allow null driftfile. * More leap second fixes from Dave Mills. * Use YYERROR_VERBOSE for the new parser, and fix related BUILT_SOURCES. diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c index 991d5bf451..84fdd44fc3 100644 --- a/ntpd/ntp_config.c +++ b/ntpd/ntp_config.c @@ -129,7 +129,7 @@ static char res_file[MAX_PATH]; */ int curr_include_level; /* The current include level */ -struct FILE_INFO *fp[MAXINCLUDELEVEL]; +struct FILE_INFO *fp[MAXINCLUDELEVEL+1]; FILE *res_fp; struct config_tree my_config; /* Root of the configuration tree */ short default_ai_family = AF_UNSPEC; /* Default either IPv4 or IPv6 */ @@ -1325,7 +1325,8 @@ config_phone(void) } free_node(s); } - sys_phone[i] = NULL; + if (i) + sys_phone[i] = NULL; } static void diff --git a/ntpd/ntp_scanner.h b/ntpd/ntp_scanner.h index d743d74694..527aa6c69a 100644 --- a/ntpd/ntp_scanner.h +++ b/ntpd/ntp_scanner.h @@ -54,7 +54,7 @@ extern struct FILE_INFO *ip_file; /* Pointer to the configuration file stream extern short default_ai_family; extern int old_config_style; extern int input_from_file; -extern struct FILE_INFO *fp[MAXINCLUDELEVEL]; +extern struct FILE_INFO *fp[]; /* VARIOUS SUBROUTINE DECLARATIONS * -------------------------------