summaryrefslogtreecommitdiff
path: root/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-16 03:57:07 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-16 03:57:07 +0200
commit94b6dfa24f84bd8854c1dc566413b0719dce9e0d (patch)
tree58036dab36657dce62b5926a103232b8a907dbdf /unit.c
parentc1b94fda55e6e29e388a30f846b62650b5e60f7e (diff)
unit,job: when we suppress a D-Bus signal because nobody is listening, don't delay it until later
Diffstat (limited to 'unit.c')
-rw-r--r--unit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/unit.c b/unit.c
index 1757af317d..ee0c120b24 100644
--- a/unit.c
+++ b/unit.c
@@ -272,9 +272,14 @@ void unit_add_to_dbus_queue(Unit *u) {
assert(u);
assert(u->meta.type != _UNIT_TYPE_INVALID);
- if (u->meta.load_state == UNIT_STUB || u->meta.in_dbus_queue || set_isempty(u->meta.manager->subscribed))
+ if (u->meta.load_state == UNIT_STUB || u->meta.in_dbus_queue)
return;
+ if (set_isempty(u->meta.manager->subscribed)) {
+ u->meta.sent_dbus_new_signal = true;
+ return;
+ }
+
LIST_PREPEND(Meta, dbus_queue, u->meta.manager->dbus_unit_queue, &u->meta);
u->meta.in_dbus_queue = true;
}