Skip to content

Commit

Permalink
check_dig: expected answer is now incasesensitive
Browse files Browse the repository at this point in the history
  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
  • Loading branch information
Daniel Stirnimann authored and riskersen committed Oct 15, 2015
1 parent dfe66c0 commit 24eea9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/check_dig.c
Expand Up @@ -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;

Expand Down

0 comments on commit 24eea9f

Please sign in to comment.