From: Miroslav Lichvar Date: Wed, 12 Mar 2025 14:21:18 +0000 (+0100) Subject: sources: delay maxjitter/maxdistance warning messages X-Git-Tag: 4.7-pre1~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=072ec20e2c1d0bf716f9d70fbf5f61a8df8320cf;p=thirdparty%2Fchrony.git sources: delay maxjitter/maxdistance warning messages Avoid logging the new warning messages about exceeded maxjitter or maxdistance when only a small number of samples is collected after the source becomes reachable and the values are unstable. Log the messages only when a replacement attempt is made. --- diff --git a/sources.c b/sources.c index 8b7e8ebb..d7c11231 100644 --- a/sources.c +++ b/sources.c @@ -767,14 +767,14 @@ mark_source(SRC_Instance inst, SRC_Status status) if (!inst->reported_status[status]) { switch (status) { case SRC_BAD_DISTANCE: - if (inst->reachability_size < SOURCE_REACH_BITS && inst->bad < BAD_HANDLE_THRESHOLD) + if (inst->bad < BAD_HANDLE_THRESHOLD) break; log_selection_source(LOGS_WARN, inst, "Root distance of ## exceeds maxdistance of %.3f seconds", max_distance); break; case SRC_JITTERY: - if (inst->reachability_size < SOURCE_REACH_BITS && inst->bad < BAD_HANDLE_THRESHOLD) + if (inst->bad < BAD_HANDLE_THRESHOLD) break; log_selection_source(LOGS_WARN, inst, "Jitter of ## exceeds maxjitter of %.3f seconds",