[systemd-devel] [PATCH 7/8] timesyncd: don't reset polling interval when reselecting server

Miroslav Lichvar mlichvar at redhat.com
Wed Aug 27 07:47:23 PDT 2014


---
 src/timesync/timesyncd-manager.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
index 9f12149..d1f77a8 100644
--- a/src/timesync/timesyncd-manager.c
+++ b/src/timesync/timesyncd-manager.c
@@ -735,7 +735,8 @@ static int manager_begin(Manager *m) {
         assert_return(m->current_server_address, -EHOSTUNREACH);
 
         m->missed_replies = NTP_MAX_MISSED_REPLIES;
-        m->poll_interval_usec = NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC;
+        if (!m->poll_interval_usec)
+                m->poll_interval_usec = NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC;
 
         server_address_pretty(m->current_server_address, &pretty);
         log_info("Using NTP server %s (%s).", strna(pretty), m->current_server_name->string);
-- 
1.9.3



More information about the systemd-devel mailing list