mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
ntp: don't replace source instance when changing address
Add new functions to change source's reference ID/address and reset the instance. Use that instead of destroying and creating a new instance when the NTP address is changed.
This commit is contained in:
@@ -74,6 +74,11 @@ extern SRC_Instance SRC_CreateNewInstance(uint32_t ref_id, SRC_Type type, SRC_Se
|
||||
|
||||
extern void SRC_DestroyInstance(SRC_Instance instance);
|
||||
|
||||
/* Function to reset a source */
|
||||
extern void SRC_ResetInstance(SRC_Instance instance);
|
||||
|
||||
/* Function to change the sources's reference ID and IP address */
|
||||
extern void SRC_SetRefid(SRC_Instance instance, uint32_t ref_id, IPAddr *addr);
|
||||
|
||||
/* Function to get the range of frequencies, relative to the given
|
||||
source, that we believe the local clock lies within. The return
|
||||
@@ -174,7 +179,5 @@ extern SRC_Type SRC_GetType(int index);
|
||||
|
||||
extern int SRC_Samples(SRC_Instance inst);
|
||||
|
||||
extern SRC_SelectOption SRC_GetSelectOption(SRC_Instance inst);
|
||||
|
||||
#endif /* GOT_SOURCES_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user