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),
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)
#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
/*
#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
}
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);
}
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;
} samples[8];
unsigned samples_idx;
double samples_jitter;
- usec_t max_root_distance_usec;
+ usec_t root_distance_max_usec;
/* last change */
bool jumped;