output: allow alarming, in case of success, be silent

This will allow runnign dhcpd with cron, and when nothing is wrong emails
will not be sent.

Proposed-by: Dan Pritts <danno@umich.edu>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2013-07-11 20:29:06 +01:00
parent c0e7b50bd3
commit 9f676f5276

View file

@ -1071,7 +1071,10 @@ int output_alarming(void)
program_name);
} else {
ret_val = 0;
fprintf(outfile, "OK: ");
if (config.output_limit[1] & BIT3)
fprintf(outfile, "OK: ");
else
return ret_val;
}
if (config.output_limit[0] & BIT1) {
fprintf(outfile, "Ranges; crit: %d warn: %d ok: %d ", rc, rw,