summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/systemd/files/238-timesync-connection.patch')
-rw-r--r--sys-apps/systemd/files/238-timesync-connection.patch49
1 files changed, 0 insertions, 49 deletions
diff --git a/sys-apps/systemd/files/238-timesync-connection.patch b/sys-apps/systemd/files/238-timesync-connection.patch
deleted file mode 100644
index a48a88e9e68d..000000000000
--- a/sys-apps/systemd/files/238-timesync-connection.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 6d254dba01491b994115ecef8c4017fbe5451606 Mon Sep 17 00:00:00 2001
-From: Yu Watanabe <watanabe.yu+github@gmail.com>
-Date: Mon, 16 Apr 2018 12:24:36 +0900
-Subject: [PATCH] timesync: establish connection when network become online and
- the manager is not connected yet
-
-This also introduces `manager_is_connected()` helper function, which
-returns true when the manager is sending a request, resolving a server
-name, or in a poll interval.
-
-Follow-up for 3e85ec072180b6fbec82d715186985536859a29d.
-Fixes #8719.
----
- src/timesync/timesyncd-manager.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
-index cfdc43b0ff2..0c5d3e2d6f7 100644
---- a/src/timesync/timesyncd-manager.c
-+++ b/src/timesync/timesyncd-manager.c
-@@ -1036,6 +1036,12 @@ static int manager_network_read_link_servers(Manager *m) {
- return r;
- }
-
-+static bool manager_is_connected(Manager *m) {
-+ /* Return true when the manager is sending a request, resolving a server name, or
-+ * in a poll interval. */
-+ return m->server_socket >= 0 || m->resolve_query || m->event_timer;
-+}
-+
- static int manager_network_event_handler(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
- Manager *m = userdata;
- bool changed, connected, online;
-@@ -1051,13 +1057,13 @@ static int manager_network_event_handler(sd_event_source *s, int fd, uint32_t re
- online = network_is_online();
-
- /* check if the client is currently connected */
-- connected = m->server_socket >= 0 || m->resolve_query || m->exhausted_servers;
-+ connected = manager_is_connected(m);
-
- if (connected && !online) {
- log_info("No network connectivity, watching for changes.");
- manager_disconnect(m);
-
-- } else if (!connected && online && changed) {
-+ } else if ((!connected || changed) && online) {
- log_info("Network configuration changed, trying to establish connection.");
-
- if (m->current_server_address)