core: when we install a job, announce this via the bus

Whenever we enqueue a job, we should announce this on the bus, hence add
both the job and the unit to the dbus queues. (Why both? The former
should be obvious, the latter because we send out Job properties).

In most cases adding these to the queue is not necessary, as
other properties tend to change at the same time and result in a change
being sent out. However, let's clean this up and make it explicit.
This commit is contained in:
Lennart Poettering 2018-11-29 18:48:32 +01:00
parent 641e0d7a1b
commit e6d05912cb
1 changed files with 3 additions and 0 deletions

View File

@ -236,6 +236,9 @@ Job* job_install(Job *j) {
job_add_to_gc_queue(j);
job_add_to_dbus_queue(j); /* announce this job to clients */
unit_add_to_dbus_queue(j->unit); /* The Job property of the unit has changed now */
return j;
}