This fixes reporting of negative offsets.
Signed-off-by: Miroslav Lichvar <[email protected]>
---
clock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clock.c b/clock.c
index c3baa87..8d512ca 100644
--- a/clock.c
+++ b/clock.c
@@ -266,7 +266,7 @@ static int clock_management_get_response(struct clock *c,
struct port *p,
tsn->master_offset = c->master_offset;
tsn->ingress_time = tmv_to_nanoseconds(c->t2);
tsn->cumulativeScaledRateOffset =
- (UInteger32) (c->status.cumulativeScaledRateOffset +
+ (Integer32) (c->status.cumulativeScaledRateOffset +
c->nrr * POW2_41 - POW2_41);
tsn->scaledLastGmPhaseChange =
c->status.scaledLastGmPhaseChange;
tsn->gmTimeBaseIndicator = c->status.gmTimeBaseIndicator;
--
1.8.4.2
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel