From 6daff667c5260f1de80ac8f6d064bc433f8205a4 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Sun, 26 Feb 2012 18:03:16 +0100 Subject: [PATCH] Initialize the time properties data set. We can reuse the same function that sets the data sets in case of becoming grand master. Signed-off-by: Richard Cochran --- clock.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/clock.c b/clock.c index 5bdf711..a50177e 100644 --- a/clock.c +++ b/clock.c @@ -203,15 +203,10 @@ struct clock *clock_create(char *phc, struct interface *iface, int count, c->dds = *ds; /* Initialize the parentDS. */ - c->dad.parentPortIdentity.clockIdentity = c->dds.clockIdentity; - c->dad.parentPortIdentity.portNumber = 0; + clock_update_grandmaster(c); c->dad.parentStats = 0; c->dad.observedParentOffsetScaledLogVariance = 0xffff; c->dad.observedParentClockPhaseChangeRate = 0x7fffffff; - c->dad.grandmasterPriority1 = c->dds.priority1; - c->dad.grandmasterClockQuality = c->dds.clockQuality; - c->dad.grandmasterPriority2 = c->dds.priority2; - c->dad.grandmasterIdentity = c->dds.clockIdentity; for (i = 0; i < ARRAY_SIZE(c->pollfd); i++) { c->pollfd[i].fd = -1;