summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@aei.ca>2009-03-21 06:39:49 (GMT)
committerThomas Guyot-Sionnest <dermoth@aei.ca>2009-03-21 06:39:49 (GMT)
commit795277d9b1bf7c6d7539b4f1aac3815e6b66efe7 (patch)
treea947be7ead12c071d2387c70d689d603098c3072 /plugins
parente7cdcfee2a6025b41f67ead5020df3965ef05a98 (diff)
downloadmonitoring-plugins-795277d9b1bf7c6d7539b4f1aac3815e6b66efe7.tar.gz
check_http: die when an invalid --onredirect option is specified
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_http.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 5a859f9..c8ae67f 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -305,18 +305,19 @@ process_arguments (int argc, char **argv)
305 case 'f': /* onredirect */ 305 case 'f': /* onredirect */
306 if (!strcmp (optarg, "stickyport")) 306 if (!strcmp (optarg, "stickyport"))
307 onredirect = STATE_DEPENDENT, followsticky = STICKY_HOST|STICKY_PORT; 307 onredirect = STATE_DEPENDENT, followsticky = STICKY_HOST|STICKY_PORT;
308 if (!strcmp (optarg, "sticky")) 308 else if (!strcmp (optarg, "sticky"))
309 onredirect = STATE_DEPENDENT, followsticky = STICKY_HOST; 309 onredirect = STATE_DEPENDENT, followsticky = STICKY_HOST;
310 if (!strcmp (optarg, "follow")) 310 else if (!strcmp (optarg, "follow"))
311 onredirect = STATE_DEPENDENT, followsticky = STICKY_NONE; 311 onredirect = STATE_DEPENDENT, followsticky = STICKY_NONE;
312 if (!strcmp (optarg, "unknown")) 312 else if (!strcmp (optarg, "unknown"))
313 onredirect = STATE_UNKNOWN; 313 onredirect = STATE_UNKNOWN;
314 if (!strcmp (optarg, "ok")) 314 else if (!strcmp (optarg, "ok"))
315 onredirect = STATE_OK; 315 onredirect = STATE_OK;
316 if (!strcmp (optarg, "warning")) 316 else if (!strcmp (optarg, "warning"))
317 onredirect = STATE_WARNING; 317 onredirect = STATE_WARNING;
318 if (!strcmp (optarg, "critical")) 318 else if (!strcmp (optarg, "critical"))
319 onredirect = STATE_CRITICAL; 319 onredirect = STATE_CRITICAL;
320 else usage2 (_("Invalid onredirect option"), optarg);
320 if (verbose) 321 if (verbose)
321 printf(_("option f:%d \n"), onredirect); 322 printf(_("option f:%d \n"), onredirect);
322 break; 323 break;