From: Miroslav Lichvar Date: Wed, 28 Apr 2010 14:11:24 +0000 (+0200) Subject: Change online status also for unresolved sources X-Git-Tag: 1.25-pre1~85 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=97f3e9404aa1d636689d3cad1c14d8a602fcc888;p=thirdparty%2Fchrony.git Change online status also for unresolved sources --- diff --git a/ntp_sources.c b/ntp_sources.c index 01a1b045..00f8e3e4 100644 --- a/ntp_sources.c +++ b/ntp_sources.c @@ -403,6 +403,15 @@ NSR_TakeSourcesOnline(IPAddr *mask, IPAddr *address) } } + if (address->family == IPADDR_UNSPEC) { + struct UnresolvedSource *us; + + for (us = unresolved_sources; us; us = us->next) { + any = 1; + us->params.online = 1; + } + } + return any; } @@ -434,6 +443,15 @@ NSR_TakeSourcesOffline(IPAddr *mask, IPAddr *address) NCR_TakeSourceOffline(records[syncpeer].data); } + if (address->family == IPADDR_UNSPEC) { + struct UnresolvedSource *us; + + for (us = unresolved_sources; us; us = us->next) { + any = 1; + us->params.online = 0; + } + } + return any; }