From d8577e19942b4885ac642513540fc1791a0fa38b Mon Sep 17 00:00:00 2001 From: Matthias Eble Date: Mon, 9 Jun 2008 19:47:36 +0000 Subject: Added testcases for check_dig check_dig's -l option is mandatory now (#1986306) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2011 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/check_dig.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'plugins/check_dig.c') diff --git a/plugins/check_dig.c b/plugins/check_dig.c index e3f7adbd..34197ecc 100644 --- a/plugins/check_dig.c +++ b/plugins/check_dig.c @@ -143,8 +143,10 @@ main (int argc, char **argv) } } - if (result == STATE_UNKNOWN) + if (result == STATE_UNKNOWN) { msg = (char *)_("No ANSWER SECTION found"); + result = STATE_CRITICAL; + } /* If we get anything on STDERR, at least set warning */ if(chld_err.buflen > 0) { @@ -295,7 +297,10 @@ process_arguments (int argc, char **argv) int validate_arguments (void) { - return OK; + if (query_address != NULL) + return OK; + else + return ERROR; } @@ -357,7 +362,7 @@ void print_usage (void) { printf (_("Usage:")); - printf ("%s -H -l [-p ]\n", progname); + printf ("%s -l [-H ] [-p ]\n", progname); printf (" [-T ] [-w ] [-c ]\n"); printf (" [-t ] [-a ] [-v]\n"); } -- cgit v1.2.3