chiark / gitweb /
timesyncd: suppress resync at system time change when not connected
authorKay Sievers <kay@vrfy.org>
Tue, 15 Jul 2014 00:24:35 +0000 (02:24 +0200)
committerKay Sievers <kay@vrfy.org>
Tue, 15 Jul 2014 00:24:35 +0000 (02:24 +0200)
Jul 04 17:46:03 orchid systemd[1]: Starting Network Time Synchronization...
Jul 04 17:46:03 orchid systemd[1]: Started Network Time Synchronization.
Jul 04 17:46:22 orchid systemd-timesyncd[301]: System time changed. Resyncing.
Jul 04 17:46:22 orchid systemd-timesyncd[301]: Assertion 'm->current_server_name'

https://bugs.freedesktop.org/show_bug.cgi?id=80932

src/timesync/timesyncd.c

index 0c50902..9f1e25c 100644 (file)
@@ -331,6 +331,9 @@ 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;