config: convert the 'check_fup_sync' option to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
42dda4d2b7
commit
a4329f7873
7
config.c
7
config.c
|
@ -78,6 +78,7 @@ struct config_item {
|
|||
|
||||
struct config_item config_tab[] = {
|
||||
GLOB_ITEM_INT("assume_two_step", 0, 0, 1),
|
||||
GLOB_ITEM_INT("check_fup_sync", 0, 0, 1),
|
||||
GLOB_ITEM_INT("tx_timestamp_timeout", 1, 1, INT_MAX),
|
||||
PORT_ITEM_INT("udp_ttl", 1, 1, 255),
|
||||
};
|
||||
|
@ -520,12 +521,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, "check_fup_sync")) {
|
||||
r = get_ranged_int(value, &val, 0, 1);
|
||||
if (r != PARSED_OK)
|
||||
return r;
|
||||
*cfg->check_fup_sync = val;
|
||||
|
||||
} else if (!strcmp(option, "pi_proportional_const")) {
|
||||
r = get_ranged_double(value, &df, 0.0, DBL_MAX);
|
||||
if (r != PARSED_OK)
|
||||
|
|
2
config.h
2
config.h
|
@ -70,8 +70,6 @@ struct config {
|
|||
|
||||
struct default_ds dds;
|
||||
struct port_defaults pod;
|
||||
int *check_fup_sync;
|
||||
|
||||
enum servo_type clock_servo;
|
||||
|
||||
double *step_threshold;
|
||||
|
|
4
ptp4l.c
4
ptp4l.c
|
@ -101,9 +101,6 @@ static struct config cfg_settings = {
|
|||
.timestamping = TS_HARDWARE,
|
||||
.dm = DM_E2E,
|
||||
.transport = TRANS_UDP_IPV4,
|
||||
|
||||
.check_fup_sync = &sk_check_fupsync,
|
||||
|
||||
.clock_servo = CLOCK_SERVO_PI,
|
||||
|
||||
.step_threshold = &servo_step_threshold,
|
||||
|
@ -280,6 +277,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
assume_two_step = config_get_int(cfg, NULL, "assume_two_step");
|
||||
sk_check_fupsync = config_get_int(cfg, NULL, "check_fup_sync");
|
||||
sk_tx_timeout = config_get_int(cfg, NULL, "tx_timestamp_timeout");
|
||||
|
||||
if (!cfg_settings.dds.grand_master_capable &&
|
||||
|
|
Loading…
Reference in New Issue