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:
Miroslav Lichvar
2021-02-03 13:29:14 +01:00
parent f74eb67567
commit 1a8dcce84f
8 changed files with 17 additions and 23 deletions

View File

@@ -87,8 +87,8 @@ extern void SRC_SetRefid(SRC_Instance instance, uint32_t ref_id, IPAddr *addr);
/* Function to get access to the sourcestats instance */
extern SST_Stats SRC_GetSourcestats(SRC_Instance instance);
/* Function to set the current leap status according to the source */
extern void SRC_SetLeapStatus(SRC_Instance instance, NTP_Leap leap);
/* Function to update the stratum and leap status of the source */
extern void SRC_UpdateStatus(SRC_Instance instance, int stratum, NTP_Leap leap);
/* Function to accumulate a new sample from the source */
extern void SRC_AccumulateSample(SRC_Instance instance, NTP_Sample *sample);