chiark / gitweb /
core/unit: fix unit_add_target_dependencies() for units with no dependencies
[elogind.git] / src / core / dbus-unit.c
index 37c1e8cbf822b6542a06e945313c39ad1d8d1c29..24d8a598e7dda1db9e87d1053df8ceb5d8cd2299 100644 (file)
@@ -604,10 +604,10 @@ static int send_new_signal(sd_bus *bus, const char *destination, void *userdata)
 
         r = sd_bus_message_new_signal(
                         bus,
+                        &m,
                         "/org/freedesktop/systemd1",
                         "org.freedesktop.systemd1.Manager",
-                        "UnitNew",
-                        &m);
+                        "UnitNew");
         if (r < 0)
                 return r;
 
@@ -627,7 +627,7 @@ static int send_changed_signal(sd_bus *bus, const char *destination, void *userd
         assert(u);
 
         p = unit_dbus_path(u);
-        if (!u)
+        if (!p)
                 return -ENOMEM;
 
         /* Send a properties changed signal. First for the specific
@@ -689,10 +689,10 @@ static int send_removed_signal(sd_bus *bus, const char *destination, void *userd
 
         r = sd_bus_message_new_signal(
                         bus,
+                        &m,
                         "/org/freedesktop/systemd1",
                         "org.freedesktop.systemd1.Manager",
-                        "UnitRemoved",
-                        &m);
+                        "UnitRemoved");
         if (r < 0)
                 return r;
 
@@ -910,9 +910,6 @@ int bus_unit_set_properties(
         assert(u);
         assert(message);
 
-        if (u->transient)
-                mode &= UNIT_RUNTIME;
-
         /* We iterate through the array twice. First run we just check
          * if all passed data is valid, second run actually applies
          * it. This is to implement transaction-like behaviour without