summaryrefslogtreecommitdiff
path: root/src/core/dbus-unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-22 03:43:03 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-22 03:50:52 +0100
commitaec8de63b14a93b91b85dc15bf879604352fbbe1 (patch)
treeb408e7d047c75904b4ce472c7d74d090d3ad0602 /src/core/dbus-unit.c
parenta03e4337fd2ae1cc90989e9b7b5f160b42cdb021 (diff)
core: no need to list properties for PropertiesChanged messages anymore
Since the vtable includes this information anyway, let's just use that
Diffstat (limited to 'src/core/dbus-unit.c')
-rw-r--r--src/core/dbus-unit.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index 7a566ff7f9..4d3e3cc9ec 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -634,29 +634,25 @@ static int send_changed_signal(sd_bus *bus, const char *destination, void *userd
* type, then for the generic unit. The clients may rely on
* this order to get atomic behavior if needed. */
- if (UNIT_VTABLE(u)->bus_changing_properties) {
-
- r = sd_bus_emit_properties_changed_strv(
- bus, p,
- UNIT_VTABLE(u)->bus_interface,
- (char**) UNIT_VTABLE(u)->bus_changing_properties);
- if (r < 0)
- return r;
+ r = sd_bus_emit_properties_changed_strv(
+ bus, p,
+ UNIT_VTABLE(u)->bus_interface,
+ NULL);
+ if (r < 0) {
+ log_warning("Failed to send out specific PropertiesChanged signal for %s: %s", u->id, strerror(-r));
+ return r;
}
- return sd_bus_emit_properties_changed(
+ r = sd_bus_emit_properties_changed_strv(
bus, p,
"org.freedesktop.systemd1.Unit",
- "ActiveState",
- "SubState",
- "InactiveExitTimestamp",
- "ActiveEnterTimestamp",
- "ActiveExitTimestamp",
- "InactiveEnterTimestamp",
- "Job",
- "ConditionResult",
- "ConditionTimestamp",
NULL);
+ if (r < 0) {
+ log_warning("Failed to send out generic PropertiesChanged signal for %s: %s", u->id, strerror(-r));
+ return r;
+ }
+
+ return 0;
}
void bus_unit_send_change_signal(Unit *u) {