mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
timesyncd-manager: don't clear current_server_name if ServerAddress is NULL
https://bugs.freedesktop.org/show_bug.cgi?id=83091 [zj: add comment]
This commit is contained in:
parent
44481a8b53
commit
20f8d3cf1b
Notes:
Lennart Poettering
2014-10-24 17:47:45 +02:00
Backport: bugfix
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user