From 2fcac204de1dbd3fd26ef1ebaed330cd188f380d Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Sun, 11 Mar 2012 10:52:01 +0100 Subject: [PATCH] Do not calculate the path delay without valid sync time stamps. Signed-off-by: Richard Cochran --- clock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clock.c b/clock.c index a50177e..d788b3e 100644 --- a/clock.c +++ b/clock.c @@ -333,6 +333,9 @@ void clock_path_delay(struct clock *c, struct timespec req, struct timestamp rx, { tmv_t c1, c2, c3, pd, t1, t2, t3, t4; + if (tmv_is_zero(c->t1)) + return; + c1 = c->c1; c2 = c->c2; c3 = correction_to_tmv(correction);