]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: queue loading transient units after setting their properties (#3676)
authorDavid Michael <fedora.dm0@gmail.com>
Fri, 8 Jul 2016 03:43:01 +0000 (20:43 -0700)
committerLennart Poettering <lennart@poettering.net>
Fri, 8 Jul 2016 03:43:01 +0000 (05:43 +0200)
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
src/core/unit.c

index 86722e116229588b36af7384334b533eb2c352d1..d05968bd651e074ccbbebbc2daed49251d10fe80 100644 (file)
@@ -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;
index 8e5395361d9b62d1ac2fe90348e2c00e983cd405..5f06a7dfe7e2bdd1b158e1cba8535659b5b65e3a 100644 (file)
@@ -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);