summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2024-08-19 15:26:52 +0200
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2024-08-19 15:26:52 +0200
commitb6c72064a53da8b173b7406a0a535922dc0cc1b3 (patch)
tree4b7d0e07ab606515ebaca809e4b89044ac5dbb7e /plugins
parent46efe803cf8e7b769ca112afc158b76510b01e46 (diff)
downloadmonitoring-plugins-b6c72064a53da8b173b7406a0a535922dc0cc1b3.tar.gz
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.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_curl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index bf46b226..38c97109 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -1775,9 +1775,9 @@ process_arguments (int argc, char **argv)
1775 invert_regex = true; 1775 invert_regex = true;
1776 break; 1776 break;
1777 case STATE_REGEX: 1777 case STATE_REGEX:
1778 if (!strcmp (optarg, "critical")) 1778 if (!strcasecmp (optarg, "critical"))
1779 state_regex = STATE_CRITICAL; 1779 state_regex = STATE_CRITICAL;
1780 else if (!strcmp (optarg, "warning")) 1780 else if (!strcasecmp (optarg, "warning"))
1781 state_regex = STATE_WARNING; 1781 state_regex = STATE_WARNING;
1782 else usage2 (_("Invalid state-regex option"), optarg); 1782 else usage2 (_("Invalid state-regex option"), optarg);
1783 break; 1783 break;