diff options
-rw-r--r-- | src/timesync/timesyncd-bus.c | 2 | ||||
-rw-r--r-- | src/timesync/timesyncd-gperf.gperf | 2 | ||||
-rw-r--r-- | src/timesync/timesyncd-manager.c | 8 | ||||
-rw-r--r-- | src/timesync/timesyncd-manager.h | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/timesync/timesyncd-bus.c b/src/timesync/timesyncd-bus.c index c5ad5feb95..1a14564e04 100644 --- a/src/timesync/timesyncd-bus.c +++ b/src/timesync/timesyncd-bus.c @@ -165,7 +165,7 @@ static const sd_bus_vtable manager_vtable[] = { SD_BUS_PROPERTY("FallbackNTPServers", "as", property_get_servers, offsetof(Manager, fallback_servers), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("ServerName", "s", property_get_current_server_name, offsetof(Manager, current_server_name), 0), SD_BUS_PROPERTY("ServerAddress", "(iay)", property_get_current_server_address, offsetof(Manager, current_server_address), 0), - SD_BUS_PROPERTY("RootDistanceMaxUSec", "t", bus_property_get_usec, offsetof(Manager, max_root_distance_usec), SD_BUS_VTABLE_PROPERTY_CONST), + SD_BUS_PROPERTY("RootDistanceMaxUSec", "t", bus_property_get_usec, offsetof(Manager, root_distance_max_usec), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("PollIntervalMinUSec", "t", bus_property_get_usec, offsetof(Manager, poll_interval_min_usec), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("PollIntervalMaxUSec", "t", bus_property_get_usec, offsetof(Manager, poll_interval_max_usec), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("PollIntervalUSec", "t", bus_property_get_usec, offsetof(Manager, poll_interval_usec), 0), diff --git a/src/timesync/timesyncd-gperf.gperf b/src/timesync/timesyncd-gperf.gperf index 1a26995751..556a2e9ba8 100644 --- a/src/timesync/timesyncd-gperf.gperf +++ b/src/timesync/timesyncd-gperf.gperf @@ -21,7 +21,7 @@ struct ConfigPerfItem; Time.NTP, config_parse_servers, SERVER_SYSTEM, 0 Time.Servers, config_parse_servers, SERVER_SYSTEM, 0 Time.FallbackNTP, config_parse_servers, SERVER_FALLBACK, 0 -Time.RootDistanceMaxSec, config_parse_sec, 0, offsetof(Manager, max_root_distance_usec) +Time.RootDistanceMaxSec, config_parse_sec, 0, offsetof(Manager, root_distance_max_usec) Time.PollIntervalMinSec, config_parse_sec, 0, offsetof(Manager, poll_interval_min_usec) Time.PollIntervalMaxSec, config_parse_sec, 0, offsetof(Manager, poll_interval_max_usec) Time.ConnectionRetrySec, config_parse_sec, 0, offsetof(Manager, connection_retry_usec) diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c index 8c2ee4cbec..ed6bbb4c81 100644 --- a/src/timesync/timesyncd-manager.c +++ b/src/timesync/timesyncd-manager.c @@ -34,7 +34,7 @@ #define ADJ_SETOFFSET 0x0100 /* add 'time' to current time */ #endif -/* expected accuracy of time synchronization; used to adjust the poll interval */ +/* Expected accuracy of time synchronization; used to adjust the poll interval */ #define NTP_ACCURACY_SEC 0.2 /* @@ -45,7 +45,7 @@ #define NTP_MAX_ADJUST 0.4 /* Default of maximum acceptable root distance in microseconds. */ -#define NTP_MAX_ROOT_DISTANCE (5 * USEC_PER_SEC) +#define NTP_ROOT_DISTANCE_MAX_USEC (5 * USEC_PER_SEC) /* Maximum number of missed replies before selecting another source. */ #define NTP_MAX_MISSED_REPLIES 2 @@ -507,7 +507,7 @@ static int manager_receive_response(sd_event_source *source, int fd, uint32_t re } root_distance = ntp_ts_short_to_d(&ntpmsg.root_delay) / 2 + ntp_ts_short_to_d(&ntpmsg.root_dispersion); - if (root_distance > (double) m->max_root_distance_usec / (double) USEC_PER_SEC) { + if (root_distance > (double) m->root_distance_max_usec / (double) USEC_PER_SEC) { log_info("Server has too large root distance. Disconnecting."); return manager_connect(m); } @@ -1081,7 +1081,7 @@ int manager_new(Manager **ret) { if (!m) return -ENOMEM; - m->max_root_distance_usec = NTP_MAX_ROOT_DISTANCE; + m->root_distance_max_usec = NTP_ROOT_DISTANCE_MAX_USEC; m->poll_interval_min_usec = NTP_POLL_INTERVAL_MIN_USEC; m->poll_interval_max_usec = NTP_POLL_INTERVAL_MAX_USEC; diff --git a/src/timesync/timesyncd-manager.h b/src/timesync/timesyncd-manager.h index af218a5f63..4aa7575a80 100644 --- a/src/timesync/timesyncd-manager.h +++ b/src/timesync/timesyncd-manager.h @@ -79,7 +79,7 @@ struct Manager { } samples[8]; unsigned samples_idx; double samples_jitter; - usec_t max_root_distance_usec; + usec_t root_distance_max_usec; /* last change */ bool jumped; |