mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:05:06 -05:00
ntp: refactor switching between online and offline state
Use an enum to describe connectivity of a source and merge the NCR and NSR TakeSourceOnline/Offline() functions into SetConnectivity() functions.
This commit is contained in:
2
conf.c
2
conf.c
@@ -1411,7 +1411,7 @@ CNF_AddInitSources(void)
|
||||
ntp_addr.ip_addr = *(IPAddr *)ARR_GetElement(init_sources, i);
|
||||
ntp_addr.port = cps_source.port;
|
||||
cps_source.params.iburst = 1;
|
||||
cps_source.params.online = 0;
|
||||
cps_source.params.connectivity = SRC_OFFLINE;
|
||||
|
||||
NSR_AddSource(&ntp_addr, NTP_SERVER, &cps_source.params);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user