ntp: use async name resolving for NTP sources

Use the new asynchronous call to resolve addresses of NTP servers
configured by the server/peer directives. Introduce a callback to be
notified when the first resolving attempt ends to correctly finish
chronyd initialization (dumpfile reload and reference mode end).
This commit is contained in:
Miroslav Lichvar
2014-04-25 16:58:21 +02:00
parent 779e40ed66
commit 6ee357d230
4 changed files with 133 additions and 49 deletions

2
conf.c
View File

@@ -1186,8 +1186,6 @@ CNF_AddSources(void) {
NSR_AddUnresolvedSource(ntp_sources[i].params.name, ntp_sources[i].params.port,
ntp_sources[i].type, &ntp_sources[i].params.params);
}
NSR_ResolveSources();
}
/* ================================================== */