From 18d7ea62b334cb852cd6269e11444f9f39379d38 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 11 Mar 2020 11:38:24 +0100 Subject: [PATCH] reference: don't report synchronized status after unknown step The source handler resets SST instances on an unknown step, which makes the sources unselectable, but SRC_SelectSource() doesn't call REF_SetUnsynchronised() when no source is selectable. Handle the step in the reference handler. Fixes: 049eae661ae3 ("sources: keep synchronized status with unreachable/unselectable sources") --- reference.c | 1 + sources.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/reference.c b/reference.c index eda04bd..10192ea 100644 --- a/reference.c +++ b/reference.c @@ -168,6 +168,7 @@ handle_slew(struct timespec *raw, if (change_type == LCL_ChangeUnknownStep) { last_ref_update = 0.0; + REF_SetUnsynchronised(); } /* When the clock was stepped, check if that doesn't change our leap status diff --git a/sources.c b/sources.c index 2e6f45e..b440d9d 100644 --- a/sources.c +++ b/sources.c @@ -1128,7 +1128,7 @@ slew_sources(struct timespec *raw, struct timespec *cooked, double dfreq, } if (change_type == LCL_ChangeUnknownStep) { - /* After resetting no source is selectable, set reference unsynchronised */ + /* Update selection status */ SRC_SelectSource(NULL); } }