mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 21:45:07 -05:00
conf: don't repeat error message when adding sourcedir source
When a source from a configured sourcedir cannot be added (e.g. it is a duplicate of another source), log the error message only on the first attempt adding the source, until the source is removed and added to a sourcedir again. This avoids spamming of the system log with error messages if the reload sources command is called frequently (e.g. from a DHCP renewal networking script).
This commit is contained in:
2
conf.c
2
conf.c
@@ -1751,7 +1751,7 @@ reload_source_dirs(void)
|
||||
|
||||
if (s == NSR_UnresolvedName) {
|
||||
unresolved++;
|
||||
} else if (s != NSR_Success) {
|
||||
} else if (s != NSR_Success && (d > 0 || s != prev_sources[i].status)) {
|
||||
LOG(LOGS_ERR, "Could not add source %s : %s",
|
||||
source->params.name, NSR_StatusToString(s));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user