From 999c86f4a9da4bf4508b3a69289f58166ed18a55 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 18 Nov 2015 14:23:20 +0100 Subject: [PATCH] tsproc: allow zero remote timestamps in delay update When remote timestamps from P2P delay measurement are not known (the remote processing time is saved in the correction field), they are set to zero. Fix tsproc to not require non-zero t1 and t4. Signed-off-by: Miroslav Lichvar --- tsproc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tsproc.c b/tsproc.c index 5026f2e..7e14b24 100644 --- a/tsproc.c +++ b/tsproc.c @@ -144,8 +144,7 @@ int tsproc_update_delay(struct tsproc *tsp, tmv_t *delay) { tmv_t raw_delay; - if (tmv_is_zero(tsp->t1) || tmv_is_zero(tsp->t2) || - tmv_is_zero(tsp->t3) || tmv_is_zero(tsp->t4)) + if (tmv_is_zero(tsp->t2) || tmv_is_zero(tsp->t3)) return -1; raw_delay = get_raw_delay(tsp);