summaryrefslogtreecommitdiffstats
path: root/plugins/check_http.c
diff options
context:
space:
mode:
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)
676 } else if (!document_date || !*document_date) { 676 } else if (!document_date || !*document_date) {
677 die (STATE_CRITICAL, _("Document modification date unknown\n")); 677 die (STATE_CRITICAL, _("Document modification date unknown\n"));
678 } else { 678 } else {
679 time_t sd = parse_time_string (server_date); 679 time_t srv_data = parse_time_string (server_date);
680 time_t dd = parse_time_string (document_date); 680 time_t doc_data = parse_time_string (document_date);
681 681
682 if (sd <= 0) { 682 if (srv_data <= 0) {
683 die (STATE_CRITICAL, _("CRITICAL - Server date \"%100s\" unparsable"), server_date); 683 die (STATE_CRITICAL, _("CRITICAL - Server date \"%100s\" unparsable"), server_date);
684 } else if (dd <= 0) { 684 } else if (doc_data <= 0) {
685 die (STATE_CRITICAL, _("CRITICAL - Document date \"%100s\" unparsable"), document_date); 685 die (STATE_CRITICAL, _("CRITICAL - Document date \"%100s\" unparsable"), document_date);
686 } else if (dd > sd + 30) { 686 } else if (doc_data > srv_data + 30) {
687 die (STATE_CRITICAL, _("CRITICAL - Document is %d seconds in the future\n"), dd - sd); 687 die (STATE_CRITICAL, _("CRITICAL - Document is %d seconds in the future\n"), (int)doc_data - (int)srv_data);
688 } else if (dd < sd - maximum_age) { 688 } else if (doc_data < srv_data - maximum_age) {
689 int n = (sd - dd); 689 int n = (srv_data - doc_data);
690 if (n > (60 * 60 * 24 * 2)) 690 if (n > (60 * 60 * 24 * 2))
691 die (STATE_CRITICAL, 691 die (STATE_CRITICAL,
692 _("CRITICAL - Last modified %.1f days ago\n"), 692 _("CRITICAL - Last modified %.1f days ago\n"),