mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 20:55:07 -05:00
sources: update stratum with leap status
Remove stratum from the NTP sample and update it together with the leap status. This enables a faster update when samples are dropped by the NTP filters.
This commit is contained in:
@@ -79,10 +79,9 @@ test_unit(void)
|
||||
sample.peer_dispersion = TST_GetRandomDouble(1.0e-6, 1.0e-1);
|
||||
sample.root_delay = sample.peer_delay;
|
||||
sample.root_dispersion = sample.peer_dispersion;
|
||||
sample.stratum = 1;
|
||||
|
||||
if (random() % 2)
|
||||
SRC_SetLeapStatus(srcs[j], random() % 4);
|
||||
SRC_UpdateStatus(srcs[j], 1, random() % 4);
|
||||
|
||||
DEBUG_LOG("source %d sample %d offset %f delay %f disp %f", j, k,
|
||||
sample.offset, sample.peer_delay, sample.peer_dispersion);
|
||||
|
||||
Reference in New Issue
Block a user