mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 07:47:00 +00:00
output: check alarming mode can output successfully
Fixes also a resource leak. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
f6e256243d
commit
a3ef3d617f
1 changed files with 5 additions and 1 deletions
|
|
@ -1002,8 +1002,12 @@ int output_alarming(void)
|
|||
} else {
|
||||
if (config.number_limit & A_BIT)
|
||||
fprintf(outfile, "OK:");
|
||||
else
|
||||
else {
|
||||
if (close_stream(outfile)) {
|
||||
error(EXIT_FAILURE, errno, "output_alarming: fclose");
|
||||
}
|
||||
return ret_val;
|
||||
}
|
||||
}
|
||||
if (config.header_limit & R_BIT) {
|
||||
fprintf(outfile, " Ranges - crit: %d warn: %d ok: %d", rc, rw, ro);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue