sources: ignore inactive sources in special mode ending
This commit is contained in:
parent
8671002bd7
commit
7fa22d4c25
2 changed files with 6 additions and 2 deletions
4
main.c
4
main.c
|
@ -150,8 +150,8 @@ post_init_ntp_hook(void *anything)
|
||||||
RCL_StartRefclocks();
|
RCL_StartRefclocks();
|
||||||
|
|
||||||
/* Special modes can end only when sources update their reachability.
|
/* Special modes can end only when sources update their reachability.
|
||||||
Give up immediatelly if there are no sources. */
|
Give up immediatelly if there are no active sources. */
|
||||||
if (ref_mode != REF_ModeNormal && !SRC_ReadNumberOfSources()) {
|
if (ref_mode != REF_ModeNormal && !SRC_ActiveSources()) {
|
||||||
REF_SetUnsynchronised();
|
REF_SetUnsynchronised();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -373,6 +373,10 @@ special_mode_end(void)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < n_sources; i++) {
|
for (i = 0; i < n_sources; i++) {
|
||||||
|
/* No updates from inactive sources */
|
||||||
|
if (!sources[i]->active)
|
||||||
|
continue;
|
||||||
|
|
||||||
/* Don't expect more updates than from an offline iburst NTP source */
|
/* Don't expect more updates than from an offline iburst NTP source */
|
||||||
if (sources[i]->reachability_size >= SOURCE_REACH_BITS - 1)
|
if (sources[i]->reachability_size >= SOURCE_REACH_BITS - 1)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue