Fix conversion of cumulativeScaledRateOffset in TIME_STATUS_NP.

This fixes reporting of negative offsets.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
master
Miroslav Lichvar 2014-02-21 11:08:33 +01:00 committed by Richard Cochran
parent b2bde6f5ec
commit 85cebe0265
1 changed files with 1 additions and 1 deletions

View File

@ -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;