From 2ab4d8fc278413b01ff9c4e4496f892398f80a4c Mon Sep 17 00:00:00 2001 From: Benoit Mortier Date: Sun, 5 Dec 2004 00:54:09 +0000 Subject: 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 --- plugins/check_http.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'plugins/check_http.c') 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"), -- cgit v1.2.3