diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-11-05 10:41:34 +0100 |
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-11-05 10:41:34 +0100 |
| commit | 16daa06e439da1541cbcb4e0622131838b21ba0f (patch) | |
| tree | 660dcee34f328c407e5e4e6166d32f72f618fb1b /plugins/check_ntp_time.c | |
| parent | b35853ee4e10c4485a9521d77c95aecae6573e64 (diff) | |
| download | monitoring-plugins-16daa06e439da1541cbcb4e0622131838b21ba0f.tar.gz | |
check_ntp_time: actually accept offset if known
Diffstat (limited to 'plugins/check_ntp_time.c')
| -rw-r--r-- | plugins/check_ntp_time.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/check_ntp_time.c b/plugins/check_ntp_time.c index eee9c298..d554089d 100644 --- a/plugins/check_ntp_time.c +++ b/plugins/check_ntp_time.c | |||
| @@ -478,6 +478,7 @@ static offset_request_wrapper offset_request(const char *host, const char *port, | |||
| 478 | if (best_index < 0) { | 478 | if (best_index < 0) { |
| 479 | result.offset_result = STATE_UNKNOWN; | 479 | result.offset_result = STATE_UNKNOWN; |
| 480 | } else { | 480 | } else { |
| 481 | result.offset_result = STATE_OK; | ||
| 481 | /* finally, calculate the average offset */ | 482 | /* finally, calculate the average offset */ |
| 482 | for (int i = 0; i < servers[best_index].num_responses; i++) { | 483 | for (int i = 0; i < servers[best_index].num_responses; i++) { |
| 483 | avg_offset += servers[best_index].offset[i]; | 484 | avg_offset += servers[best_index].offset[i]; |
