summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 17127bb)
raw | patch | inline | side by side (parent: 17127bb)
author | M. Sean Finney <seanius@users.sourceforge.net> | |
Sat, 2 Sep 2006 20:32:27 +0000 (20:32 +0000) | ||
committer | M. Sean Finney <seanius@users.sourceforge.net> | |
Sat, 2 Sep 2006 20:32:27 +0000 (20:32 +0000) |
would exit with a usage error if non-int timeouts were passed.
- change --warning-time/--critical-time to just --warning/--critical,
as it's what --help says.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1473 f882894a-f735-0410-b71e-b25c423dba1c
- change --warning-time/--critical-time to just --warning/--critical,
as it's what --help says.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1473 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_tcp.c | patch | blob | history |
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index 5fe024bec4914a0f8650b32235f8d909dc55fc49..bbb8d111d901143d0e9b047d61aa770cb3ab7f0d 100644 (file)
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
int option = 0;
static struct option longopts[] = {
{"hostname", required_argument, 0, 'H'},
- {"critical-time", required_argument, 0, 'c'},
- {"warning-time", required_argument, 0, 'w'},
+ {"critical", required_argument, 0, 'c'},
+ {"warning", required_argument, 0, 'w'},
{"critical-codes", required_argument, 0, 'C'},
{"warning-codes", required_argument, 0, 'W'},
{"timeout", required_argument, 0, 't'},
server_address = optarg;
break;
case 'c': /* critical */
- if (!is_intnonneg (optarg))
- usage4 (_("Critical threshold must be a positive integer"));
- else
- critical_time = strtod (optarg, NULL);
+ critical_time = strtod (optarg, NULL);
flags |= FLAG_TIME_CRIT;
break;
case 'j': /* hide output */
flags |= FLAG_HIDE_OUTPUT;
break;
case 'w': /* warning */
- if (!is_intnonneg (optarg))
- usage4 (_("Warning threshold must be a positive integer"));
- else
- warning_time = strtod (optarg, NULL);
+ warning_time = strtod (optarg, NULL);
flags |= FLAG_TIME_WARN;
break;
case 'C':