]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
unit: sent change signal before removing the unit if necessary (#4106)
authorMichael Olbrich <m.olbrich@pengutronix.de>
Fri, 9 Sep 2016 15:05:06 +0000 (17:05 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 9 Sep 2016 15:05:06 +0000 (16:05 +0100)
If the unit is in the dbus queue when it is removed then the last change
signal is never sent. Fix this by checking the dbus queue and explicitly
send the change signal before sending the remove signal.

src/core/dbus-unit.c

index 1b86bdde438f75358b652009311a76a23f51a3ae..5020dfba4b0e8cb92c06cc4148bc3fbe623ae76c 100644 (file)
@@ -1167,7 +1167,7 @@ void bus_unit_send_removed_signal(Unit *u) {
         int r;
         assert(u);
 
-        if (!u->sent_dbus_new_signal)
+        if (!u->sent_dbus_new_signal || u->in_dbus_queue)
                 bus_unit_send_change_signal(u);
 
         if (!u->id)