diff options
Diffstat (limited to 'web/attachments/260847-check_ntp_time.best_offset_server_fix.patch')
| -rw-r--r-- | web/attachments/260847-check_ntp_time.best_offset_server_fix.patch | 21 |
1 files changed, 21 insertions, 0 deletions
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 @@ | |||
| 1 | Index: plugins/check_ntp_time.c | ||
| 2 | =================================================================== | ||
| 3 | --- plugins/check_ntp_time.c (revision 1885) | ||
| 4 | +++ plugins/check_ntp_time.c (working copy) | ||
| 5 | @@ -274,7 +274,7 @@ | ||
| 6 | /* if we haven't reached the current list's end, move everyone | ||
| 7 | * over one to the right, and insert the new candidate */ | ||
| 8 | if(i<csize){ | ||
| 9 | - for(j=5; j>i; j--){ | ||
| 10 | + for(j=4; j>i; j--){ | ||
| 11 | candidates[j]=candidates[j-1]; | ||
| 12 | } | ||
| 13 | } | ||
| 14 | @@ -337,6 +337,7 @@ | ||
| 15 | servers=(ntp_server_results*)malloc(sizeof(ntp_server_results)*num_hosts); | ||
| 16 | if(servers==NULL) die(STATE_UNKNOWN, "can not allocate server array"); | ||
| 17 | memset(servers, 0, sizeof(ntp_server_results)*num_hosts); | ||
| 18 | + DBG(printf("Found %d peers to check\n", num_hosts)); | ||
| 19 | |||
| 20 | /* setup each socket for writing, and the corresponding struct pollfd */ | ||
| 21 | ai_tmp=ai; | ||
