config: port: convert 'syncReceiptTimeout' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
35227f2d1f
commit
fffb6a53bd
9
config.c
9
config.c
|
@ -112,6 +112,7 @@ struct config_item config_tab[] = {
|
||||||
GLOB_ITEM_DBL("pi_proportional_norm_max", 0.7, DBL_MIN, 1.0),
|
GLOB_ITEM_DBL("pi_proportional_norm_max", 0.7, DBL_MIN, 1.0),
|
||||||
GLOB_ITEM_DBL("pi_proportional_scale", 0.0, 0.0, DBL_MAX),
|
GLOB_ITEM_DBL("pi_proportional_scale", 0.0, 0.0, DBL_MAX),
|
||||||
GLOB_ITEM_DBL("step_threshold", 0.0, 0.0, DBL_MAX),
|
GLOB_ITEM_DBL("step_threshold", 0.0, 0.0, DBL_MAX),
|
||||||
|
PORT_ITEM_INT("syncReceiptTimeout", 0, 0, UINT8_MAX),
|
||||||
GLOB_ITEM_INT("tx_timestamp_timeout", 1, 1, INT_MAX),
|
GLOB_ITEM_INT("tx_timestamp_timeout", 1, 1, INT_MAX),
|
||||||
PORT_ITEM_INT("udp_ttl", 1, 1, 255),
|
PORT_ITEM_INT("udp_ttl", 1, 1, 255),
|
||||||
GLOB_ITEM_INT("use_syslog", 1, 0, 1),
|
GLOB_ITEM_INT("use_syslog", 1, 0, 1),
|
||||||
|
@ -268,13 +269,7 @@ static enum parser_result parse_pod_setting(const char *option,
|
||||||
|
|
||||||
enum parser_result r;
|
enum parser_result r;
|
||||||
|
|
||||||
if (!strcmp(option, "syncReceiptTimeout")) {
|
if (!strcmp(option, "transportSpecific")) {
|
||||||
r = get_ranged_uint(value, &uval, 0, UINT8_MAX);
|
|
||||||
if (r != PARSED_OK)
|
|
||||||
return r;
|
|
||||||
pod->syncReceiptTimeout = uval;
|
|
||||||
|
|
||||||
} else if (!strcmp(option, "transportSpecific")) {
|
|
||||||
r = get_ranged_uint(value, &uval, 0, 0x0F);
|
r = get_ranged_uint(value, &uval, 0, 0x0F);
|
||||||
if (r != PARSED_OK)
|
if (r != PARSED_OK)
|
||||||
return r;
|
return r;
|
||||||
|
|
1
ds.h
1
ds.h
|
@ -125,7 +125,6 @@ struct portDS {
|
||||||
#define FRI_ASAP (-128)
|
#define FRI_ASAP (-128)
|
||||||
|
|
||||||
struct port_defaults {
|
struct port_defaults {
|
||||||
UInteger8 syncReceiptTimeout;
|
|
||||||
UInteger8 transportSpecific;
|
UInteger8 transportSpecific;
|
||||||
int announce_span;
|
int announce_span;
|
||||||
int path_trace_enabled;
|
int path_trace_enabled;
|
||||||
|
|
2
port.c
2
port.c
|
@ -1448,7 +1448,7 @@ static int port_initialize(struct port *p)
|
||||||
p->peerMeanPathDelay = 0;
|
p->peerMeanPathDelay = 0;
|
||||||
p->logAnnounceInterval = config_get_int(cfg, p->name, "logAnnounceInterval");
|
p->logAnnounceInterval = config_get_int(cfg, p->name, "logAnnounceInterval");
|
||||||
p->announceReceiptTimeout = config_get_int(cfg, p->name, "announceReceiptTimeout");
|
p->announceReceiptTimeout = config_get_int(cfg, p->name, "announceReceiptTimeout");
|
||||||
p->syncReceiptTimeout = p->pod.syncReceiptTimeout;
|
p->syncReceiptTimeout = config_get_int(cfg, p->name, "syncReceiptTimeout");
|
||||||
p->transportSpecific = p->pod.transportSpecific;
|
p->transportSpecific = p->pod.transportSpecific;
|
||||||
p->logSyncInterval = config_get_int(cfg, p->name, "logSyncInterval");
|
p->logSyncInterval = config_get_int(cfg, p->name, "logSyncInterval");
|
||||||
p->logMinPdelayReqInterval = config_get_int(cfg, p->name, "logMinPdelayReqInterval");
|
p->logMinPdelayReqInterval = config_get_int(cfg, p->name, "logMinPdelayReqInterval");
|
||||||
|
|
Loading…
Reference in New Issue