aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_dig.c
diff options
context:
space:
mode:
authorGravatar Ton Voon <tonvoon@users.sourceforge.net> 2005-01-26 21:21:01 +0000
committerGravatar Ton Voon <tonvoon@users.sourceforge.net> 2005-01-26 21:21:01 +0000
commitc9ce6037b55fecc1e54433b3119c0d9df1d38d01 (patch)
tree27d221c2a464fde37fcb9d4014bef7c8211ad26c /plugins/check_dig.c
parent9477122f435ec4ae657fc29bce62d71eea01cdda (diff)
downloadmonitoring-plugins-c9ce6037b55fecc1e54433b3119c0d9df1d38d01.tar.gz
Convert tabs to spaces from dig's answer section (Randy O'Meara - 1107651)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1108 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_dig.c')
-rw-r--r--plugins/check_dig.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/check_dig.c b/plugins/check_dig.c
index c6078965..4394490e 100644
--- a/plugins/check_dig.c
+++ b/plugins/check_dig.c
@@ -54,6 +54,7 @@ main (int argc, char **argv)
char input_buffer[MAX_INPUT_BUFFER];
char *command_line;
char *output;
+ char *t;
long microsec;
double elapsed_time;
int result = STATE_UNKNOWN;
@@ -124,6 +125,11 @@ main (int argc, char **argv)
result = STATE_OK;
}
+ /* Translate output TAB -> SPACE */
+ t = output;
+ while ((t = index(t, '\t')) != NULL)
+ *t = ' ';
+
} while (!strstr (input_buffer, ";; "));
if (result == STATE_UNKNOWN) {
@@ -334,7 +340,7 @@ print_help (void)
printf (_("\
-a, --expected_address=STRING\n\
- an address expected to be in the asnwer section.\n\
+ an address expected to be in the answer section.\n\
if not set, uses whatever was in -l\n"));
printf (_(UT_WARN_CRIT));