From 1e9db8b8ddaaa7c01f29d077fb12f9bd4363bed2 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 7 Feb 2013 19:56:50 +0100 Subject: [PATCH] Fix initialization of frequency estimation interval. The clock_sync_interval() function is called when logSyncInterval changes from zero. Call it also when the clock is created to have fest.max_count set accordingly to freq_est_interval even with zero logSyncInterval. Signed-off-by: Miroslav Lichvar --- clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clock.c b/clock.c index dc93bdc..d9d44df 100644 --- a/clock.c +++ b/clock.c @@ -499,7 +499,7 @@ struct clock *clock_create(int phc_index, struct interface *iface, int count, c->pollfd[i].events = 0; } - c->fest.max_count = 2; + clock_sync_interval(c, 0); for (i = 0; i < count; i++) { c->fault_timeout[i] = iface[i].pod.fault_reset_interval;