config: port: convert 'announceReceiptTimeout' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
639ce56fa0
commit
35227f2d1f
9
config.c
9
config.c
|
@ -91,6 +91,7 @@ struct config_item {
|
|||
CONFIG_ITEM_INT(label, 1, _default, min, max)
|
||||
|
||||
struct config_item config_tab[] = {
|
||||
PORT_ITEM_INT("announceReceiptTimeout", 3, 2, UINT8_MAX),
|
||||
GLOB_ITEM_INT("assume_two_step", 0, 0, 1),
|
||||
GLOB_ITEM_INT("check_fup_sync", 0, 0, 1),
|
||||
PORT_ITEM_INT("delayAsymmetry", 0, INT_MIN, INT_MAX),
|
||||
|
@ -267,13 +268,7 @@ static enum parser_result parse_pod_setting(const char *option,
|
|||
|
||||
enum parser_result r;
|
||||
|
||||
if (!strcmp(option, "announceReceiptTimeout")) {
|
||||
r = get_ranged_uint(value, &uval, 2, UINT8_MAX);
|
||||
if (r != PARSED_OK)
|
||||
return r;
|
||||
pod->announceReceiptTimeout = uval;
|
||||
|
||||
} else if (!strcmp(option, "syncReceiptTimeout")) {
|
||||
if (!strcmp(option, "syncReceiptTimeout")) {
|
||||
r = get_ranged_uint(value, &uval, 0, UINT8_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 {
|
||||
UInteger8 announceReceiptTimeout;
|
||||
UInteger8 syncReceiptTimeout;
|
||||
UInteger8 transportSpecific;
|
||||
int announce_span;
|
||||
|
|
2
port.c
2
port.c
|
@ -1447,7 +1447,7 @@ static int port_initialize(struct port *p)
|
|||
p->logMinDelayReqInterval = config_get_int(cfg, p->name, "logMinDelayReqInterval");
|
||||
p->peerMeanPathDelay = 0;
|
||||
p->logAnnounceInterval = config_get_int(cfg, p->name, "logAnnounceInterval");
|
||||
p->announceReceiptTimeout = p->pod.announceReceiptTimeout;
|
||||
p->announceReceiptTimeout = config_get_int(cfg, p->name, "announceReceiptTimeout");
|
||||
p->syncReceiptTimeout = p->pod.syncReceiptTimeout;
|
||||
p->transportSpecific = p->pod.transportSpecific;
|
||||
p->logSyncInterval = config_get_int(cfg, p->name, "logSyncInterval");
|
||||
|
|
Loading…
Reference in New Issue