From 8e3de495cb19ab15d29838a7c289b7d1b65edf9c Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Wed, 6 Mar 1996 10:38:53 +0000 Subject: [PATCH] Don't try to parse the lease file if it's not there --- confpars.c | 4 +++- server/confpars.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/confpars.c b/confpars.c index d80e276e..3617366e 100644 --- a/confpars.c +++ b/confpars.c @@ -81,8 +81,10 @@ void read_leases (void) jmp_buf bc; /* Open the lease file... */ - if ((cfile = fopen (_PATH_DHCPD_DB, "r")) == NULL) + if ((cfile = fopen (_PATH_DHCPD_DB, "r")) == NULL) { warn ("Can't open lease database %s: %m", _PATH_DHCPD_DB); + return; + } do { token = next_token (&val, cfile); if (token == EOF) diff --git a/server/confpars.c b/server/confpars.c index d80e276e..3617366e 100644 --- a/server/confpars.c +++ b/server/confpars.c @@ -81,8 +81,10 @@ void read_leases (void) jmp_buf bc; /* Open the lease file... */ - if ((cfile = fopen (_PATH_DHCPD_DB, "r")) == NULL) + if ((cfile = fopen (_PATH_DHCPD_DB, "r")) == NULL) { warn ("Can't open lease database %s: %m", _PATH_DHCPD_DB); + return; + } do { token = next_token (&val, cfile); if (token == EOF)