Ver Fonte

fix: simplified exact match functionality

Griffin Westerman há 1 ano atrás
pai
commit
cba6658b69
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      plugins/check_dig.c

+ 1 - 1
plugins/check_dig.c

@@ -151,7 +151,7 @@ main (int argc, char **argv)
         }
         }
 
 
         t = tt; /* consider the right-side token, does it match ex? */
         t = tt; /* consider the right-side token, does it match ex? */
-        if ( (!exact && strcasestr( t, ex )) || ((strcasestr( t, ex ) == t) && (strlen( t ) == strlen( ex ))) ) {
+        if ( (!exact && strcasestr( t, ex )) || (strcmp( t, ex ) == 0) ) {
           result = STATE_OK;
           result = STATE_OK;
           msg = chld_out.line[i];
           msg = chld_out.line[i];
           break;
           break;