]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: send out unit change events when a new invocation ID is acquired
authorLennart Poettering <lennart@poettering.net>
Thu, 29 Nov 2018 15:39:18 +0000 (16:39 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 1 Dec 2018 11:53:26 +0000 (12:53 +0100)
It's free, as this generally coincides with unit_start(), but let's make
this clean and explicit.

src/core/dbus-unit.c
src/core/unit.c

index f398dabc8d7c3e97ddd6ec6006e8359799a21880..ca81f6acc71195284e6470292127c8802c5bef6a 100644 (file)
@@ -675,7 +675,7 @@ const sd_bus_vtable bus_unit_vtable[] = {
         SD_BUS_PROPERTY("SuccessAction", "s", property_get_emergency_action, offsetof(Unit, success_action), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("SuccessActionExitStatus", "i", bus_property_get_int, offsetof(Unit, success_action_exit_status), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("RebootArgument", "s", NULL, offsetof(Unit, reboot_arg), SD_BUS_VTABLE_PROPERTY_CONST),
-        SD_BUS_PROPERTY("InvocationID", "ay", bus_property_get_id128, offsetof(Unit, invocation_id), 0),
+        SD_BUS_PROPERTY("InvocationID", "ay", bus_property_get_id128, offsetof(Unit, invocation_id), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("CollectMode", "s", property_get_collect_mode, offsetof(Unit, collect_mode), 0),
         SD_BUS_PROPERTY("Refs", "as", property_get_refs, 0, 0),
 
index 175c56f48ab9025914a4f68506e237f2c915807a..9f715b164cbfaa27129133741299be23f3d380c8 100644 (file)
@@ -4986,6 +4986,7 @@ int unit_acquire_invocation_id(Unit *u) {
         if (r < 0)
                 return log_unit_error_errno(u, r, "Failed to set invocation ID for unit: %m");
 
+        unit_add_to_dbus_queue(u);
         return 0;
 }