Miroslav Lichvar
2015-11-18 13:23:20 UTC
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 <***@redhat.com>
---
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);
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 <***@redhat.com>
---
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);
--
2.1.0
------------------------------------------------------------------------------
2.1.0
------------------------------------------------------------------------------