From 8936a5e34dbfa9274348f3fef99f7c9f9327ddf9 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Tue, 22 Dec 2015 11:37:09 +0100 Subject: 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. --- src/core/manager.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/manager.c') diff --git a/src/core/manager.c b/src/core/manager.c index e65616adc1..ffe27be743 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2574,6 +2574,10 @@ int manager_reload(Manager *m) { /* Third, fire things up! */ manager_coldplug(m); + /* Sync current state of bus names with our set of listening units */ + if (m->api_bus) + manager_sync_bus_names(m, m->api_bus); + assert(m->n_reloading > 0); m->n_reloading--; -- cgit v1.2.3-54-g00ecf