summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-15 09:52:17 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-15 09:52:19 -0400
commitc566ee3253132cc2ec37ed04c5bccbadf8e60c58 (patch)
tree79b177cee45c78456e246aaf9ca17c57b899a2e9
parentafc7b1b9c170b9d23a3d91367e00f33b2ee2e89e (diff)
timesyncd: only listen to clock changes when connected
This reverts previous commit and applies a different fix. manager_clock_watch() callback calls manager_send_request() to kick off a resync. We can only do that when we're actually connected to something. It is not useful to setup the callback from manager_new(). Now the callback will be dropped in manager_connect() and requested in manager_begin(). https://bugs.freedesktop.org/show_bug.cgi?id=80932
-rw-r--r--src/timesync/timesyncd.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
index 9f1e25c7cf..e15588d1cf 100644
--- a/src/timesync/timesyncd.c
+++ b/src/timesync/timesyncd.c
@@ -331,9 +331,6 @@ static int manager_clock_watch(sd_event_source *source, int fd, uint32_t revents
/* rearm timer */
manager_clock_watch_setup(m);
- if (!m->current_server_address)
- return 0;
-
/* skip our own jumps */
if (m->jumped) {
m->jumped = false;
@@ -1049,10 +1046,6 @@ static int manager_new(Manager **ret) {
if (r < 0)
return r;
- r = manager_clock_watch_setup(m);
- if (r < 0)
- return r;
-
*ret = m;
m = NULL;