summaryrefslogtreecommitdiff
path: root/src/core/dbus.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-12-22 11:37:09 +0100
committerDaniel Mack <daniel@zonque.org>2015-12-23 23:31:35 +0100
commit8936a5e34dbfa9274348f3fef99f7c9f9327ddf9 (patch)
tree81f2cf8438bb9ecaaffae9451d8c8cec0f898e87 /src/core/dbus.c
parenta6cff5d3c0e9a5aef3f1440b089fdb9f30bf444f (diff)
core: re-sync bus name list after deserializing during daemon-reload
When the daemon reloads, it doesn not actually give up its DBus connection, as wrongly stated in an earlier commit. However, even though the bus connection stays open, the daemon flushes out all its internal state. Hence, if there is a NameOwnerChanged signal after the flush and before the deserialization, it cannot be matched against any pending unit. To fix this, rename bus_list_names() to manager_sync_bus_names() and call it explicitly at the end of the daemon reload operation.
Diffstat (limited to 'src/core/dbus.c')
-rw-r--r--src/core/dbus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/dbus.c b/src/core/dbus.c
index 58069f59c3..1d89b9e250 100644
--- a/src/core/dbus.c
+++ b/src/core/dbus.c
@@ -734,7 +734,7 @@ static int bus_on_connection(sd_event_source *s, int fd, uint32_t revents, void
return 0;
}
-static int bus_list_names(Manager *m, sd_bus *bus) {
+int manager_sync_bus_names(Manager *m, sd_bus *bus) {
_cleanup_strv_free_ char **names = NULL;
const char *name;
Iterator i;
@@ -850,7 +850,7 @@ static int bus_setup_api(Manager *m, sd_bus *bus) {
if (r < 0)
return log_error_errno(r, "Failed to register name: %m");
- r = bus_list_names(m, bus);
+ r = manager_sync_bus_names(m, bus);
if (r < 0)
return r;