From: Lennart Poettering Date: Thu, 29 Nov 2018 15:39:18 +0000 (+0100) Subject: core: send out unit change events when a new invocation ID is acquired X-Git-Tag: v240~127^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=af92c603bb820235b080b26c4fe452369d6be67c;p=thirdparty%2Fsystemd.git core: send out unit change events when a new invocation ID is acquired It's free, as this generally coincides with unit_start(), but let's make this clean and explicit. --- diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c index f398dabc8d7..ca81f6acc71 100644 --- a/src/core/dbus-unit.c +++ b/src/core/dbus-unit.c @@ -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), diff --git a/src/core/unit.c b/src/core/unit.c index 175c56f48ab..9f715b164cb 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -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; }