summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e7cdcfe)
raw | patch | inline | side by side (parent: e7cdcfe)
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Sat, 21 Mar 2009 06:39:49 +0000 (02:39 -0400) | ||
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Sat, 21 Mar 2009 06:39:49 +0000 (02:39 -0400) |
plugins/check_http.c | patch | blob | history |
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 5a859f98774bafa8513cbe64d91bb08fdfd277d2..c8ae67f864df58a7bf783aee470b524d641cd227 100644 (file)
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
case 'f': /* onredirect */
if (!strcmp (optarg, "stickyport"))
onredirect = STATE_DEPENDENT, followsticky = STICKY_HOST|STICKY_PORT;
- if (!strcmp (optarg, "sticky"))
+ else if (!strcmp (optarg, "sticky"))
onredirect = STATE_DEPENDENT, followsticky = STICKY_HOST;
- if (!strcmp (optarg, "follow"))
+ else if (!strcmp (optarg, "follow"))
onredirect = STATE_DEPENDENT, followsticky = STICKY_NONE;
- if (!strcmp (optarg, "unknown"))
+ else if (!strcmp (optarg, "unknown"))
onredirect = STATE_UNKNOWN;
- if (!strcmp (optarg, "ok"))
+ else if (!strcmp (optarg, "ok"))
onredirect = STATE_OK;
- if (!strcmp (optarg, "warning"))
+ else if (!strcmp (optarg, "warning"))
onredirect = STATE_WARNING;
- if (!strcmp (optarg, "critical"))
+ else if (!strcmp (optarg, "critical"))
onredirect = STATE_CRITICAL;
+ else usage2 (_("Invalid onredirect option"), optarg);
if (verbose)
printf(_("option f:%d \n"), onredirect);
break;