mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:55:07 -05:00
sources: improve handling of dump files and their format
Check for write errors when saving dump files. Don't save files with no samples. Add more sanity checks for loaded data. Extend the file format to include an identifier, the reachability register, leap status, name, and authentication flag. Avoid loading unauthenticated data after switching authentication on. Change format and order of some fields to simplify parsing. Drop fields that were kept only for compatibility. The dump files now contain all information needed to perform the source selection and update the reference. There is no support kept for the old file format. Loading of old dump files will fail after upgrading to new version.
This commit is contained in:
@@ -119,7 +119,7 @@ extern int SST_GetDelayTestData(SST_Stats inst, struct timespec *sample_time,
|
||||
double *last_sample_ago, double *predicted_offset,
|
||||
double *min_delay, double *skew, double *std_dev);
|
||||
|
||||
extern void SST_SaveToFile(SST_Stats inst, FILE *out);
|
||||
extern int SST_SaveToFile(SST_Stats inst, FILE *out);
|
||||
|
||||
extern int SST_LoadFromFile(SST_Stats inst, FILE *in);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user