config: convert 'tx_timestamp_timeout' to the new scheme.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2015-08-12 18:47:32 +02:00
parent 85bbf9d919
commit 42dda4d2b7
3 changed files with 2 additions and 8 deletions

View File

@ -78,6 +78,7 @@ struct config_item {
struct config_item config_tab[] = {
GLOB_ITEM_INT("assume_two_step", 0, 0, 1),
GLOB_ITEM_INT("tx_timestamp_timeout", 1, 1, INT_MAX),
PORT_ITEM_INT("udp_ttl", 1, 1, 255),
};
@ -519,12 +520,6 @@ static enum parser_result parse_global_setting(const char *option,
cfg->dds.freq_est_interval = val;
pod->freq_est_interval = val;
} else if (!strcmp(option, "tx_timestamp_timeout")) {
r = get_ranged_int(value, &val, 1, INT_MAX);
if (r != PARSED_OK)
return r;
*cfg->tx_timestamp_timeout = val;
} else if (!strcmp(option, "check_fup_sync")) {
r = get_ranged_int(value, &val, 0, 1);
if (r != PARSED_OK)

View File

@ -70,7 +70,6 @@ struct config {
struct default_ds dds;
struct port_defaults pod;
int *tx_timestamp_timeout;
int *check_fup_sync;
enum servo_type clock_servo;

View File

@ -102,7 +102,6 @@ static struct config cfg_settings = {
.dm = DM_E2E,
.transport = TRANS_UDP_IPV4,
.tx_timestamp_timeout = &sk_tx_timeout,
.check_fup_sync = &sk_check_fupsync,
.clock_servo = CLOCK_SERVO_PI,
@ -281,6 +280,7 @@ int main(int argc, char *argv[])
}
assume_two_step = config_get_int(cfg, NULL, "assume_two_step");
sk_tx_timeout = config_get_int(cfg, NULL, "tx_timestamp_timeout");
if (!cfg_settings.dds.grand_master_capable &&
ds->flags & DDS_SLAVE_ONLY) {