diff --git a/config.h b/config.h index 9a265c0..6c4d484 100644 --- a/config.h +++ b/config.h @@ -44,9 +44,6 @@ struct config { /* hash of all non-legacy items */ struct hash *htab; - - /* the rest are legacy fields */ - struct default_ds dds; }; int config_read(char *name, struct config *cfg); diff --git a/ptp4l.c b/ptp4l.c index 7fe2144..d245517 100644 --- a/ptp4l.c +++ b/ptp4l.c @@ -43,6 +43,8 @@ static struct config cfg_settings = { .interfaces = STAILQ_HEAD_INITIALIZER(cfg_settings.interfaces), }; +static struct default_ds ptp4l_dds; + static void usage(char *progname) { fprintf(stderr, @@ -82,8 +84,8 @@ int main(int argc, char *argv[]) struct interface *iface; struct clock *clock; struct config *cfg = &cfg_settings; - struct default_ds *dds = &cfg_settings.dds; - struct defaultDS *ds = &cfg_settings.dds.dds; + struct default_ds *dds = &ptp4l_dds; + struct defaultDS *ds = &ptp4l_dds.dds; int phc_index = -1, print_level, required_modes = 0; unsigned char oui[OUI_LEN]; @@ -339,7 +341,7 @@ int main(int argc, char *argv[]) clock = clock_create(&cfg_settings, phc_index, &cfg_settings.interfaces, - &cfg_settings.dds); + &ptp4l_dds); if (!clock) { fprintf(stderr, "failed to create a clock\n"); return -1;