mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-05-28 04:35:40 -04:00
check_curl: Parse state-regex option ignoring case
Previously the --state-regex option accepted only "critical" and "warning" as values. This commit changes the strcmp there to strcasecmp to be more tolerant regarding the input.
This commit is contained in:
parent
46efe803cf
commit
b6c72064a5
1 changed files with 2 additions and 2 deletions
|
|
@ -1775,9 +1775,9 @@ process_arguments (int argc, char **argv)
|
|||
invert_regex = true;
|
||||
break;
|
||||
case STATE_REGEX:
|
||||
if (!strcmp (optarg, "critical"))
|
||||
if (!strcasecmp (optarg, "critical"))
|
||||
state_regex = STATE_CRITICAL;
|
||||
else if (!strcmp (optarg, "warning"))
|
||||
else if (!strcasecmp (optarg, "warning"))
|
||||
state_regex = STATE_WARNING;
|
||||
else usage2 (_("Invalid state-regex option"), optarg);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue