[Nagiosplug-checkins] nagiosplug/plugins check_dig.c,1.39,1.40

Ton Voon tonvoon at users.sourceforge.net
Wed Jan 26 13:22:01 CET 2005


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20641

Modified Files:
	check_dig.c 
Log Message:
Convert tabs to spaces from dig's answer section (Randy O'Meara - 1107651)


Index: check_dig.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dig.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- check_dig.c	25 Dec 2004 23:17:38 -0000	1.39
+++ check_dig.c	26 Jan 2005 21:21:01 -0000	1.40
@@ -54,6 +54,7 @@
 	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 @@
                         	        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 @@
 
         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));





More information about the Commits mailing list