summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Stirnimann <daniel.stirnimann@gmail.com>2015-10-15 10:59:32 +0200
committerOliver Skibbe <oliskibbe@gmail.com>2015-10-15 10:59:32 +0200
commit24eea9fa34d009971378fda6754ce0a9ac01f21d (patch)
tree20689cc3cdb9ef4d980e349733c9b130a219dd36
parentdfe66c01c0b556dfbac9c1d901d3ba9ed6a1deac (diff)
downloadmonitoring-plugins-24eea9fa34d009971378fda6754ce0a9ac01f21d.tar.gz
check_dig: expected answer is now incasesensitive
check_dig was casesensitive if an expected answer is given. Switching strstr with strcasestr fixes this issue While testing i noticed a bug where expected is not an exact match New issue for that is opened #1385 This fix closes #1233
-rw-r--r--plugins/check_dig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_dig.c b/plugins/check_dig.c
index db4b20eb..473d4b97 100644
--- a/plugins/check_dig.c
+++ b/plugins/check_dig.c
@@ -125,7 +125,7 @@ main (int argc, char **argv)
125 if (verbose) 125 if (verbose)
126 printf ("%s\n", chld_out.line[i]); 126 printf ("%s\n", chld_out.line[i]);
127 127
128 if (strstr (chld_out.line[i], (expected_address == NULL ? query_address : expected_address)) != NULL) { 128 if (strcasestr (chld_out.line[i], (expected_address == NULL ? query_address : expected_address)) != NULL) {
129 msg = chld_out.line[i]; 129 msg = chld_out.line[i];
130 result = STATE_OK; 130 result = STATE_OK;
131 131