From eb8507a45a02de6bcbdf66f1f868a3b5dcd57207 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Fri, 23 Mar 2018 08:26:01 -0700 Subject: [PATCH] clock: Calculate frequency offset even without any delay estimation. If the "free_running" option is set, the "no adjust" calculates and prints an estimation of the phase and frequency offsets to the remote master. Because the phase estimate requires a delay measurement, this calculation is not performed without having the delay estimate first. However, a typical transparent clock application will want to use the frequency offset to correct the residence times to match the master's frequency. This patch adds a call to the "no adjust" routine even if no valid delay measurement has been made. Signed-off-by: Richard Cochran --- clock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clock.c b/clock.c index 57683b9..1405cb4 100644 --- a/clock.c +++ b/clock.c @@ -1599,7 +1599,11 @@ enum servo_state clock_synchronize(struct clock *c, tmv_t ingress, tmv_t origin) tsproc_down_ts(c->tsproc, origin, ingress); if (tsproc_update_offset(c->tsproc, &c->master_offset, &weight)) { - return state; + if (c->free_running) { + return clock_no_adjust(c, ingress, origin); + } else { + return state; + } } if (clock_utc_correct(c, ingress)) {