sources: ignore noselect sources when updating selection options

Ignore any sources specified with the noselect option with respect to
the auth selection mode.
This commit is contained in:
Miroslav Lichvar
2020-05-18 12:06:27 +02:00
parent 4f5343f086
commit a6ec6ec3ac
3 changed files with 18 additions and 3 deletions

View File

@@ -501,6 +501,8 @@ update_sel_options(void)
auth_ntp_sources = unauth_ntp_sources = 0;
for (i = 0; i < n_sources; i++) {
if (sources[i]->conf_sel_options & SRC_SELECT_NOSELECT)
continue;
if (sources[i]->type != SRC_NTP)
continue;
if (sources[i]->authenticated)
@@ -535,6 +537,9 @@ update_sel_options(void)
for (i = 0; i < n_sources; i++) {
options = sources[i]->conf_sel_options;
if (options & SRC_SELECT_NOSELECT)
continue;
switch (sources[i]->type) {
case SRC_NTP:
options |= sources[i]->authenticated ? auth_ntp_options : unauth_ntp_options;