mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 02:55:07 -05:00
Fix jitter test in source selection
Distance should be compared to square root of variance.
This commit is contained in:
@@ -622,7 +622,7 @@ SRC_SelectSource(unsigned long match_addr)
|
|||||||
variance */
|
variance */
|
||||||
for (i=0; i<n_sel_sources; i++) {
|
for (i=0; i<n_sel_sources; i++) {
|
||||||
index = sel_sources[i];
|
index = sel_sources[i];
|
||||||
if (sources[index]->sel_info.variance > min_distance) {
|
if (sqrt(sources[index]->sel_info.variance) > min_distance) {
|
||||||
sel_sources[i] = INVALID_SOURCE;
|
sel_sources[i] = INVALID_SOURCE;
|
||||||
sources[index]->status = SRC_JITTERY;
|
sources[index]->status = SRC_JITTERY;
|
||||||
#if 0
|
#if 0
|
||||||
|
|||||||
Reference in New Issue
Block a user