summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2005-01-26 21:21:01 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2005-01-26 21:21:01 (GMT)
commitc9ce6037b55fecc1e54433b3119c0d9df1d38d01 (patch)
tree27d221c2a464fde37fcb9d4014bef7c8211ad26c
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
-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 c607896..4394490 100644
--- a/plugins/check_dig.c
+++ b/plugins/check_dig.c
@@ -54,6 +54,7 @@ main (int argc, char **argv)
54 char input_buffer[MAX_INPUT_BUFFER]; 54 char input_buffer[MAX_INPUT_BUFFER];
55 char *command_line; 55 char *command_line;
56 char *output; 56 char *output;
57 char *t;
57 long microsec; 58 long microsec;
58 double elapsed_time; 59 double elapsed_time;
59 int result = STATE_UNKNOWN; 60 int result = STATE_UNKNOWN;
@@ -124,6 +125,11 @@ main (int argc, char **argv)
124 result = STATE_OK; 125 result = STATE_OK;
125 } 126 }
126 127
128 /* Translate output TAB -> SPACE */
129 t = output;
130 while ((t = index(t, '\t')) != NULL)
131 *t = ' ';
132
127 } while (!strstr (input_buffer, ";; ")); 133 } while (!strstr (input_buffer, ";; "));
128 134
129 if (result == STATE_UNKNOWN) { 135 if (result == STATE_UNKNOWN) {
@@ -334,7 +340,7 @@ print_help (void)
334 340
335 printf (_("\ 341 printf (_("\
336 -a, --expected_address=STRING\n\ 342 -a, --expected_address=STRING\n\
337 an address expected to be in the asnwer section.\n\ 343 an address expected to be in the answer section.\n\
338 if not set, uses whatever was in -l\n")); 344 if not set, uses whatever was in -l\n"));
339 345
340 printf (_(UT_WARN_CRIT)); 346 printf (_(UT_WARN_CRIT));