LIST_REMOVE(Job, dbus_queue, j->manager->dbus_job_queue, j);
j->in_dbus_queue = false;
- if (set_isempty(j->manager->subscribed))
+ if (set_isempty(j->manager->subscribed)) {
+ j->sent_dbus_new_signal = true;
return;
+ }
if (!(p = job_dbus_path(j)))
goto oom;
LIST_REMOVE(Meta, dbus_queue, u->meta.manager->dbus_unit_queue, &u->meta);
u->meta.in_dbus_queue = false;
- if (set_isempty(u->meta.manager->subscribed))
+ if (set_isempty(u->meta.manager->subscribed)) {
+ u->meta.sent_dbus_new_signal = true;
return;
+ }
if (!(p = unit_dbus_path(u)))
goto oom;
if (j->in_dbus_queue)
return;
+ if (set_isempty(j->manager->subscribed)) {
+ j->sent_dbus_new_signal = true;
+ return;
+ }
+
LIST_PREPEND(Job, dbus_queue, j->manager->dbus_job_queue, j);
j->in_dbus_queue = true;
}
#define GC_QUEUE_ENTRIES_MAX 16
/* As soon as 5s passed since a unit was added to our GC queue, make sure to run a gc sweep */
-#define GC_QUEUE_USEC_MAX (5*USEC_PER_SEC)
+#define GC_QUEUE_USEC_MAX (10*USEC_PER_SEC)
static int enable_special_signals(Manager *m) {
char fd;
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;
}