summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Noonan <steven@uplinklabs.net>2014-08-30 14:58:06 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-08-31 03:18:57 +0200
commit20f8d3cf1be4ad76234ffb85eeae7f9892ee72cd (patch)
tree8333ffeacc3f8c392dd83c65c36870143da0b4c6 /src
parentsd-dhcp6-client: properly calculate buffer size when parsing options (diff)
downloadsystemd-20f8d3cf1be4ad76234ffb85eeae7f9892ee72cd.tar.xz
systemd-20f8d3cf1be4ad76234ffb85eeae7f9892ee72cd.zip
timesyncd-manager: don't clear current_server_name if ServerAddress is NULL
https://bugs.freedesktop.org/show_bug.cgi?id=83091 [zj: add comment]
Diffstat (limited to 'src')
-rw-r--r--src/timesync/timesyncd-manager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
index 9b8b7d3eb6..696dd10e69 100644
--- a/src/timesync/timesyncd-manager.c
+++ b/src/timesync/timesyncd-manager.c
@@ -766,8 +766,11 @@ void manager_set_server_address(Manager *m, ServerAddress *a) {
if (m->current_server_address == a)
return;
- m->current_server_name = a ? a->name : NULL;
m->current_server_address = a;
+ /* If a is NULL, we are just clearing the address, without
+ * changing the name. Keep the existing name in that case. */
+ if (a)
+ m->current_server_name = a->name;
manager_disconnect(m);