Initialize clock rate ratio.

This fixes cumulativeScaledRateOffset reported in TIME_STATUS_NP before
the rate ratio is updated from port.

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

View File

@ -646,6 +646,7 @@ struct clock *clock_create(int phc_index, struct interface *iface, int count,
pr_err("Failed to create delay filter");
return NULL;
}
c->nrr = 1.0;
c->stats_interval = dds->stats_interval;
c->stats.offset = stats_create();
c->stats.freq = stats_create();
@ -1188,6 +1189,7 @@ static void handle_state_decision_event(struct clock *c)
c->t1 = tmv_zero();
c->t2 = tmv_zero();
c->path_delay = 0;
c->nrr = 1.0;
fresh_best = 1;
}