aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_http.c
diff options
context:
space:
mode:
authorGravatar Benoit Mortier <opensides@users.sourceforge.net> 2004-12-05 00:54:09 +0000
committerGravatar Benoit Mortier <opensides@users.sourceforge.net> 2004-12-05 00:54:09 +0000
commit2ab4d8fc278413b01ff9c4e4496f892398f80a4c (patch)
tree6d402f5bf1b4673d00f97bbb84b1ea6b4badd060 /plugins/check_http.c
parente9e1fe6ef5720adf355b605ffdbe94cd608cc46c (diff)
downloadmonitoring-plugins-2ab4d8fc278413b01ff9c4e4496f892398f80a4c.tar.gz
fix patch 998291
fix patch 1078934 expect check_ssh fix and check_nt perfdata should stay on one word like in nagios git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1004 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r--plugins/check_http.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 6f8ad9a4..dd058219 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -676,17 +676,17 @@ check_document_dates (const char *headers)
} else if (!document_date || !*document_date) {
die (STATE_CRITICAL, _("Document modification date unknown\n"));
} else {
- time_t sd = parse_time_string (server_date);
- time_t dd = parse_time_string (document_date);
+ time_t srv_data = parse_time_string (server_date);
+ time_t doc_data = parse_time_string (document_date);
- if (sd <= 0) {
+ if (srv_data <= 0) {
die (STATE_CRITICAL, _("CRITICAL - Server date \"%100s\" unparsable"), server_date);
- } else if (dd <= 0) {
+ } else if (doc_data <= 0) {
die (STATE_CRITICAL, _("CRITICAL - Document date \"%100s\" unparsable"), document_date);
- } else if (dd > sd + 30) {
- die (STATE_CRITICAL, _("CRITICAL - Document is %d seconds in the future\n"), dd - sd);
- } else if (dd < sd - maximum_age) {
- int n = (sd - dd);
+ } else if (doc_data > srv_data + 30) {
+ die (STATE_CRITICAL, _("CRITICAL - Document is %d seconds in the future\n"), (int)doc_data - (int)srv_data);
+ } else if (doc_data < srv_data - maximum_age) {
+ int n = (srv_data - doc_data);
if (n > (60 * 60 * 24 * 2))
die (STATE_CRITICAL,
_("CRITICAL - Last modified %.1f days ago\n"),