diff options
Diffstat (limited to 'web/attachments/83489-check_smtp.patch')
| -rw-r--r-- | web/attachments/83489-check_smtp.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/web/attachments/83489-check_smtp.patch b/web/attachments/83489-check_smtp.patch new file mode 100644 index 0000000..cf3fd67 --- /dev/null +++ b/web/attachments/83489-check_smtp.patch | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | --- plugins/check_smtp.c.orig Mon Apr 12 20:21:34 2004 | ||
| 2 | +++ plugins/check_smtp.c Mon Apr 12 22:29:17 2004 | ||
| 3 | @@ -219,15 +219,16 @@ | ||
| 4 | microsec = deltime (tv); | ||
| 5 | elapsed_time = (double)microsec / 1.0e6; | ||
| 6 | |||
| 7 | - if (check_critical_time && elapsed_time > (double) critical_time) | ||
| 8 | - result = STATE_CRITICAL; | ||
| 9 | - else if (check_warning_time && elapsed_time > (double) warning_time) | ||
| 10 | - result = STATE_WARNING; | ||
| 11 | + if (result == STATE_OK) | ||
| 12 | + if (check_critical_time && elapsed_time > (double) critical_time) | ||
| 13 | + result = STATE_CRITICAL; | ||
| 14 | + else if (check_warning_time && elapsed_time > (double) warning_time) | ||
| 15 | + result = STATE_WARNING; | ||
| 16 | |||
| 17 | printf (_("SMTP %s - %.3f sec. response time%s%s|%s\n"), | ||
| 18 | state_text (result), elapsed_time, | ||
| 19 | verbose?", ":"", verbose?buffer:"", | ||
| 20 | - perfdata ("time", microsec, "us", | ||
| 21 | + fperfdata ("time", elapsed_time, "s", | ||
| 22 | (int)check_warning_time, warning_time, | ||
| 23 | (int)check_critical_time, critical_time, | ||
| 24 | TRUE, 0, FALSE, 0)); | ||
