From 80fbf05e75b75b7dd342ec844275efae90c479ec Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Mon, 21 May 2012 12:54:34 +0200 Subject: dbus-unit: always load the unit before handling a message for it We need to be able to show the properties even of inactive units. systemctl loads the unit before getting its properties, but this is racy as the garbage collector may kick in right after the loading. Fix it by always loading the unit before handling a message for it. https://bugzilla.redhat.com/show_bug.cgi?id=814966#c6 --- src/core/manager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/manager.h') diff --git a/src/core/manager.h b/src/core/manager.h index 92dc75db55..046540d896 100644 --- a/src/core/manager.h +++ b/src/core/manager.h @@ -249,11 +249,11 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds); Job *manager_get_job(Manager *m, uint32_t id); Unit *manager_get_unit(Manager *m, const char *name); -int manager_get_unit_from_dbus_path(Manager *m, const char *s, Unit **_u); int manager_get_job_from_dbus_path(Manager *m, const char *s, Job **_j); int manager_load_unit_prepare(Manager *m, const char *name, const char *path, DBusError *e, Unit **_ret); int manager_load_unit(Manager *m, const char *name, const char *path, DBusError *e, Unit **_ret); +int manager_load_unit_from_dbus_path(Manager *m, const char *s, DBusError *e, Unit **_u); int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool force, DBusError *e, Job **_ret); int manager_add_job_by_name(Manager *m, JobType type, const char *name, JobMode mode, bool force, DBusError *e, Job **_ret); -- cgit v1.2.3-54-g00ecf