From 4f952a3f07313e0373e568cb777cd90b27304b63 Mon Sep 17 00:00:00 2001 From: David Michael Date: Thu, 7 Jul 2016 20:43:01 -0700 Subject: core: queue loading transient units after setting their properties (#3676) The unit load queue can be processed in the middle of setting the unit's properties, so its load_state would no longer be UNIT_STUB for the check in bus_unit_set_properties(), which would cause it to incorrectly return an error. --- src/core/dbus-manager.c | 1 + src/core/unit.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 86722e1162..d05968bd65 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -781,6 +781,7 @@ static int transient_unit_from_message( return r; /* Now load the missing bits of the unit we just created */ + unit_add_to_load_queue(u); manager_dispatch_load_queue(m); *unit = u; diff --git a/src/core/unit.c b/src/core/unit.c index 8e5395361d..5f06a7dfe7 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -3505,7 +3505,6 @@ int unit_make_transient(Unit *u) { unit_add_to_dbus_queue(u); unit_add_to_gc_queue(u); - unit_add_to_load_queue(u); fputs("# This is a transient unit file, created programmatically via the systemd API. Do not edit.\n", u->transient_file); -- cgit v1.2.3-54-g00ecf