check_dig is case sensitive (#1233)

stirnim notifications at github.com
Mon Feb 10 12:47:09 CET 2014


A simple replace of strstr with strcasestr should fix it I guess

--- a/plugins/check_dig.c
+++ b/plugins/check_dig.c
@@ -125,7 +125,7 @@ main (int argc, char **argv)
	 if (verbose)
	   printf ("%s\n", chld_out.line[i]);

-	 if (strstr (chld_out.line[i], (expected_address == NULL ?
query_address : expected_address)) != NULL) {
+	 if (strcasestr (chld_out.line[i], (expected_address == NULL ?
query_address : expected_address)) != NULL) {
	   msg = chld_out.line[i];
	   result = STATE_OK;



-- 
Reply to this email on GitHub:
https://github.com/monitoring-plugins/monitoring-plugins/issues/1233#issuecomment-34623003
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20140210/c609be4e/attachment.html>


More information about the Devel mailing list