summaryrefslogtreecommitdiffstats
path: root/web/attachments/311556-patch-nagios-plugins-1.4.12
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/311556-patch-nagios-plugins-1.4.12')
-rw-r--r--web/attachments/311556-patch-nagios-plugins-1.4.1256
1 files changed, 56 insertions, 0 deletions
diff --git a/web/attachments/311556-patch-nagios-plugins-1.4.12 b/web/attachments/311556-patch-nagios-plugins-1.4.12
new file mode 100644
index 0000000..49a3d6f
--- /dev/null
+++ b/web/attachments/311556-patch-nagios-plugins-1.4.12
@@ -0,0 +1,56 @@
1--- check_smtp.orig 2009-01-19 10:57:05.000000000 +0100
2+++ check_smtp.c 2009-01-19 11:34:04.000000000 +0100
3@@ -103,9 +103,9 @@
4 char *authtype = NULL;
5 char *authuser = NULL;
6 char *authpass = NULL;
7-int warning_time = 0;
8+double warning_time = 0;
9 int check_warning_time = FALSE;
10-int critical_time = 0;
11+double critical_time = 0;
12 int check_critical_time = FALSE;
13 int verbose = 0;
14 int use_ssl = FALSE;
15@@ -432,9 +432,9 @@
16 elapsed_time = (double)microsec / 1.0e6;
17
18 if (result == STATE_OK) {
19- if (check_critical_time && elapsed_time > (double) critical_time)
20+ if (check_critical_time && elapsed_time > critical_time)
21 result = STATE_CRITICAL;
22- else if (check_warning_time && elapsed_time > (double) warning_time)
23+ else if (check_warning_time && elapsed_time > warning_time)
24 result = STATE_WARNING;
25 }
26
27@@ -565,21 +565,19 @@
28 nresponses++;
29 break;
30 case 'c': /* critical time threshold */
31- if (is_intnonneg (optarg)) {
32- critical_time = atoi (optarg);
33- check_critical_time = TRUE;
34- }
35+ if (!is_nonnegative (optarg))
36+ usage4 (_("Critical time must be a positive"));
37 else {
38- usage4 (_("Critical time must be a positive integer"));
39+ critical_time = strtod (optarg, NULL);
40+ check_critical_time = TRUE;
41 }
42 break;
43 case 'w': /* warning time threshold */
44- if (is_intnonneg (optarg)) {
45- warning_time = atoi (optarg);
46- check_warning_time = TRUE;
47- }
48+ if (!is_nonnegative (optarg))
49+ usage4 (_("Warning time must be a positive"));
50 else {
51- usage4 (_("Warning time must be a positive integer"));
52+ warning_time = strtod (optarg, NULL);
53+ check_warning_time = TRUE;
54 }
55 break;
56 case 'v': /* verbose */