diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2007-11-10 17:37:11 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2007-11-10 17:37:11 +0000 |
commit | b24243c2d93511d57ad028b25389795a0094291a (patch) | |
tree | e2e600825b220ae1ff133b3abd320cddcae08584 | |
parent | 561a3e87622781f49918eb5a9b888e0c11655db9 (diff) | |
download | monitoring-plugins-b24243c2d93511d57ad028b25389795a0094291a.tar.gz |
Fix newly added stratum check (has to be decreased by one when using normal NTP packets versus control packets)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1822 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r-- | plugins/check_ntp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c index df6e02f8..28541616 100644 --- a/plugins/check_ntp.c +++ b/plugins/check_ntp.c | |||
@@ -487,7 +487,9 @@ double offset_request(const char *host, int *stratum, int *status){ | |||
487 | avg_offset+=servers[best_index].offset[j]; | 487 | avg_offset+=servers[best_index].offset[j]; |
488 | } | 488 | } |
489 | avg_offset/=servers[best_index].num_responses; | 489 | avg_offset/=servers[best_index].num_responses; |
490 | *stratum = servers[best_index].stratum; | 490 | /* Stratum sent in normal packets is ingreased by 1 (i.e. stratum that |
491 | * would be displayed if we were a server) so we decrease it */ | ||
492 | *stratum = servers[best_index].stratum - 1; | ||
491 | } | 493 | } |
492 | 494 | ||
493 | /* cleanup */ | 495 | /* cleanup */ |