From 639ce56fa0e167344ceb85c20235841086485d70 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Sat, 15 Aug 2015 11:02:22 +0200 Subject: [PATCH] config: port: convert 'logMinPdelayReqInterval' to the new scheme. Signed-off-by: Richard Cochran --- config.c | 9 ++------- ds.h | 1 - port.c | 2 +- ptp4l.c | 1 - 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/config.c b/config.c index 56a86e9..833d894 100644 --- a/config.c +++ b/config.c @@ -97,6 +97,7 @@ struct config_item config_tab[] = { GLOB_ITEM_DBL("first_step_threshold", 0.00002, 0.0, DBL_MAX), PORT_ITEM_INT("logAnnounceInterval", 1, INT8_MIN, INT8_MAX), PORT_ITEM_INT("logMinDelayReqInterval", 0, INT8_MIN, INT8_MAX), + PORT_ITEM_INT("logMinPdelayReqInterval", 0, INT8_MIN, INT8_MAX), PORT_ITEM_INT("logSyncInterval", 0, INT8_MIN, INT8_MAX), GLOB_ITEM_INT("logging_level", LOG_INFO, PRINT_LEVEL_MIN, PRINT_LEVEL_MAX), GLOB_ITEM_INT("max_frequency", 900000000, 0, INT_MAX), @@ -266,13 +267,7 @@ static enum parser_result parse_pod_setting(const char *option, enum parser_result r; - if (!strcmp(option, "logMinPdelayReqInterval")) { - r = get_ranged_int(value, &val, INT8_MIN, INT8_MAX); - if (r != PARSED_OK) - return r; - pod->logMinPdelayReqInterval = val; - - } else if (!strcmp(option, "announceReceiptTimeout")) { + if (!strcmp(option, "announceReceiptTimeout")) { r = get_ranged_uint(value, &uval, 2, UINT8_MAX); if (r != PARSED_OK) return r; diff --git a/ds.h b/ds.h index f83490b..94db41b 100644 --- a/ds.h +++ b/ds.h @@ -125,7 +125,6 @@ struct portDS { #define FRI_ASAP (-128) struct port_defaults { - Integer8 logMinPdelayReqInterval; UInteger8 announceReceiptTimeout; UInteger8 syncReceiptTimeout; UInteger8 transportSpecific; diff --git a/port.c b/port.c index 00e654e..304b25c 100644 --- a/port.c +++ b/port.c @@ -1451,7 +1451,7 @@ static int port_initialize(struct port *p) p->syncReceiptTimeout = p->pod.syncReceiptTimeout; p->transportSpecific = p->pod.transportSpecific; p->logSyncInterval = config_get_int(cfg, p->name, "logSyncInterval"); - p->logMinPdelayReqInterval = p->pod.logMinPdelayReqInterval; + p->logMinPdelayReqInterval = config_get_int(cfg, p->name, "logMinPdelayReqInterval"); p->neighborPropDelayThresh = p->pod.neighborPropDelayThresh; p->min_neighbor_prop_delay = p->pod.min_neighbor_prop_delay; diff --git a/ptp4l.c b/ptp4l.c index 2b58b13..8b9531e 100644 --- a/ptp4l.c +++ b/ptp4l.c @@ -80,7 +80,6 @@ static struct config cfg_settings = { }, .pod = { - .logMinPdelayReqInterval = 0, .announceReceiptTimeout = 3, .syncReceiptTimeout = 0, .transportSpecific = 0,