summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e1c2613)
raw | patch | inline | side by side (parent: e1c2613)
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Wed, 12 Nov 2003 05:28:42 +0000 (05:28 +0000) | ||
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Wed, 12 Nov 2003 05:28:42 +0000 (05:28 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@764 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_dig.c | patch | blob | history |
diff --git a/plugins/check_dig.c b/plugins/check_dig.c
index c67da30aaf4b74b2f068eb5723c2ae26eeaaccb8..e348a352bec09323eeef97c134f70f43e21e1871 100644 (file)
--- a/plugins/check_dig.c
+++ b/plugins/check_dig.c
if (output == NULL || strlen (output) == 0)
asprintf (&output, _(" Probably a non-existent host/domain"));
- if (critical_interval != UNDEFINED && elapsed_time > critical_interval)
+ if (critical_interval > UNDEFINED && elapsed_time > critical_interval)
result = STATE_CRITICAL;
- else if (warning_interval != UNDEFINED && elapsed_time > warning_interval)
+ else if (warning_interval > UNDEFINED && elapsed_time > warning_interval)
result = STATE_WARNING;
asprintf (&output, _("%.3f seconds response time (%s)"), elapsed_time, output);
printf ("DNS %s - %s|%s\n",
state_text (result), output,
perfdata("time", microsec, "us",
- (warning_interval!=UNDEFINED?TRUE:FALSE),
+ (warning_interval>UNDEFINED?TRUE:FALSE),
(int)(1e6*warning_interval),
- (critical_interval!=UNDEFINED?TRUE:FALSE),
+ (critical_interval>UNDEFINED?TRUE:FALSE),
(int)(1e6*critical_interval),
TRUE, 0, FALSE, 0));
return result;
case 'w': /* warning */
if (is_nonnegative (optarg)) {
warning_interval = strtod (optarg, NULL);
- if (warning_interval == HUGE_VAL)
- usage2 (_("Input causes overflow in warning interval"), optarg);
}
else {
usage2 (_("Warning interval must be a nonnegative integer"), optarg);
case 'c': /* critical */
if (is_nonnegative (optarg)) {
critical_interval = strtod (optarg, NULL);
- if (critical_interval == HUGE_VAL)
- usage2 (_("Input causes overflow in critical interval"), optarg);
}
else {
usage2 (_("Critical interval must be a nonnegative integer"), optarg);