From: Miroslav Lichvar Date: Tue, 25 Jan 2011 16:51:19 +0000 (+0100) Subject: Ignore reselectdist for refclocks X-Git-Tag: 1.25-pre1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8fe1dc4156b871b940a4fbbca8e4039ebdc3036;p=thirdparty%2Fchrony.git Ignore reselectdist for refclocks --- diff --git a/sources.c b/sources.c index 50a5470f..634ede12 100644 --- a/sources.c +++ b/sources.c @@ -772,8 +772,10 @@ SRC_SelectSource(unsigned long match_addr) continue; } - distance = sources[i]->sel_info.root_distance + reselect_distance + + distance = sources[i]->sel_info.root_distance + (sources[i]->sel_info.stratum - min_stratum) * stratum_weight; + if (sources[i]->type == SRC_NTP) + distance += reselect_distance; if (selected_source_index != INVALID_SOURCE) {