backup counting: fix output regression

The backup count was not printed at all.  This bug was introduced in
version 2.17 (May 2012) when the uthash was taken in use.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2012-12-09 22:14:22 +00:00
parent 3471c91796
commit f1411858cb
4 changed files with 23 additions and 26 deletions

View file

@ -99,8 +99,6 @@ int parse_leases(void)
int ethernets = false;
struct leases_t *lease;
num_touches = num_leases = num_backups = 0;
dhcpd_leases = fopen(config.dhcpdlease_file, "r");
if (dhcpd_leases == NULL) {
err(EXIT_FAILURE, "parse_leases: %s", config.dhcpdlease_file);
@ -180,6 +178,7 @@ int parse_leases(void)
delete_lease(lease);
}
add_lease(&addr, BACKUP);
config.backups_found = true;
continue;
}
if (ethernets && (xstrstr(line, " hardware ethernet", 19))) {