Blame 0010-timesyncd-don-t-reset-polling-interval-when-reselect.patch
|
Michal Schmidt |
d962ba |
From 0c4d8d57d2581ea8e90f5b22ac81b249b6b28671 Mon Sep 17 00:00:00 2001
|
|
Michal Schmidt |
d962ba |
From: Kay Sievers <kay@vrfy.org>
|
|
Michal Schmidt |
d962ba |
Date: Tue, 2 Sep 2014 14:33:59 +0200
|
|
Michal Schmidt |
d962ba |
Subject: [PATCH 10/12] timesyncd: don't reset polling interval when
|
|
Michal Schmidt |
d962ba |
reselecting server
|
|
Michal Schmidt |
d962ba |
|
|
Michal Schmidt |
d962ba |
Original patch from: Miroslav Lichvar <mlichvar@redhat.com>
|
|
Michal Schmidt |
d962ba |
|
|
Michal Schmidt |
d962ba |
(cherry picked from commit 80cd2606b91ce2735a0609c6f964917cf12685aa)
|
|
Michal Schmidt |
d962ba |
---
|
|
Michal Schmidt |
d962ba |
src/timesync/timesyncd-manager.c | 3 ++-
|
|
Michal Schmidt |
d962ba |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
Michal Schmidt |
d962ba |
|
|
Michal Schmidt |
d962ba |
diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
|
|
Michal Schmidt |
d962ba |
index a66852d..3261bc1 100644
|
|
Michal Schmidt |
d962ba |
--- a/src/timesync/timesyncd-manager.c
|
|
Michal Schmidt |
d962ba |
+++ b/src/timesync/timesyncd-manager.c
|
|
Michal Schmidt |
d962ba |
@@ -721,7 +721,8 @@ static int manager_begin(Manager *m) {
|
|
Michal Schmidt |
d962ba |
assert_return(m->current_server_address, -EHOSTUNREACH);
|
|
Michal Schmidt |
d962ba |
|
|
Michal Schmidt |
d962ba |
m->missed_replies = NTP_MAX_MISSED_REPLIES;
|
|
Michal Schmidt |
d962ba |
- m->poll_interval_usec = NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC;
|
|
Michal Schmidt |
d962ba |
+ if (m->poll_interval_usec == 0)
|
|
Michal Schmidt |
d962ba |
+ m->poll_interval_usec = NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC;
|
|
Michal Schmidt |
d962ba |
|
|
Michal Schmidt |
d962ba |
server_address_pretty(m->current_server_address, &pretty);
|
|
Michal Schmidt |
d962ba |
log_info("Using NTP server %s (%s).", strna(pretty), m->current_server_name->string);
|
|
Michal Schmidt |
d962ba |
--
|
|
Michal Schmidt |
d962ba |
2.1.0
|
|
Michal Schmidt |
d962ba |
|