config: port: convert 'announceReceiptTimeout' to the new scheme.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2015-08-15 11:08:19 +02:00
parent 639ce56fa0
commit 35227f2d1f
4 changed files with 3 additions and 10 deletions

View File

@ -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
View File

@ -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
View File

@ -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");

View File

@ -80,7 +80,6 @@ static struct config cfg_settings = {
},
.pod = {
.announceReceiptTimeout = 3,
.syncReceiptTimeout = 0,
.transportSpecific = 0,
.announce_span = 1,