config: port: convert 'logAnnounceInterval' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
95a629624f
commit
8026663c43
9
config.c
9
config.c
|
@ -95,6 +95,7 @@ struct config_item config_tab[] = {
|
|||
GLOB_ITEM_INT("check_fup_sync", 0, 0, 1),
|
||||
PORT_ITEM_INT("delayAsymmetry", 0, INT_MIN, INT_MAX),
|
||||
GLOB_ITEM_DBL("first_step_threshold", 0.00002, 0.0, DBL_MAX),
|
||||
PORT_ITEM_INT("logAnnounceInterval", 1, 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),
|
||||
GLOB_ITEM_INT("ntpshm_segment", 0, INT_MIN, INT_MAX),
|
||||
|
@ -263,13 +264,7 @@ static enum parser_result parse_pod_setting(const char *option,
|
|||
|
||||
enum parser_result r;
|
||||
|
||||
if (!strcmp(option, "logAnnounceInterval")) {
|
||||
r = get_ranged_int(value, &val, INT8_MIN, INT8_MAX);
|
||||
if (r != PARSED_OK)
|
||||
return r;
|
||||
pod->logAnnounceInterval = val;
|
||||
|
||||
} else if (!strcmp(option, "logSyncInterval")) {
|
||||
if (!strcmp(option, "logSyncInterval")) {
|
||||
r = get_ranged_int(value, &val, INT8_MIN, INT8_MAX);
|
||||
if (r != PARSED_OK)
|
||||
return r;
|
||||
|
|
1
ds.h
1
ds.h
|
@ -125,7 +125,6 @@ struct portDS {
|
|||
#define FRI_ASAP (-128)
|
||||
|
||||
struct port_defaults {
|
||||
Integer8 logAnnounceInterval;
|
||||
Integer8 logSyncInterval;
|
||||
Integer8 logMinDelayReqInterval;
|
||||
Integer8 logMinPdelayReqInterval;
|
||||
|
|
3
port.c
3
port.c
|
@ -1438,6 +1438,7 @@ static void port_disable(struct port *p)
|
|||
|
||||
static int port_initialize(struct port *p)
|
||||
{
|
||||
struct config *cfg = clock_config(p->clock);
|
||||
int fd[N_TIMER_FDS], i;
|
||||
|
||||
p->multiple_seq_pdr_count = 0;
|
||||
|
@ -1445,7 +1446,7 @@ static int port_initialize(struct port *p)
|
|||
p->last_fault_type = FT_UNSPECIFIED;
|
||||
p->logMinDelayReqInterval = p->pod.logMinDelayReqInterval;
|
||||
p->peerMeanPathDelay = 0;
|
||||
p->logAnnounceInterval = p->pod.logAnnounceInterval;
|
||||
p->logAnnounceInterval = config_get_int(cfg, p->name, "logAnnounceInterval");
|
||||
p->announceReceiptTimeout = p->pod.announceReceiptTimeout;
|
||||
p->syncReceiptTimeout = p->pod.syncReceiptTimeout;
|
||||
p->transportSpecific = p->pod.transportSpecific;
|
||||
|
|
Loading…
Reference in New Issue