From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- ...0847-check_ntp_time.best_offset_server_fix.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 web/attachments/260847-check_ntp_time.best_offset_server_fix.patch (limited to 'web/attachments/260847-check_ntp_time.best_offset_server_fix.patch') diff --git a/web/attachments/260847-check_ntp_time.best_offset_server_fix.patch b/web/attachments/260847-check_ntp_time.best_offset_server_fix.patch new file mode 100644 index 0000000..c542da0 --- /dev/null +++ b/web/attachments/260847-check_ntp_time.best_offset_server_fix.patch @@ -0,0 +1,21 @@ +Index: plugins/check_ntp_time.c +=================================================================== +--- plugins/check_ntp_time.c (revision 1885) ++++ plugins/check_ntp_time.c (working copy) +@@ -274,7 +274,7 @@ + /* if we haven't reached the current list's end, move everyone + * over one to the right, and insert the new candidate */ + if(ii; j--){ ++ for(j=4; j>i; j--){ + candidates[j]=candidates[j-1]; + } + } +@@ -337,6 +337,7 @@ + servers=(ntp_server_results*)malloc(sizeof(ntp_server_results)*num_hosts); + if(servers==NULL) die(STATE_UNKNOWN, "can not allocate server array"); + memset(servers, 0, sizeof(ntp_server_results)*num_hosts); ++ DBG(printf("Found %d peers to check\n", num_hosts)); + + /* setup each socket for writing, and the corresponding struct pollfd */ + ai_tmp=ai; -- cgit v1.2.3-74-g34f1