]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: when we install a job, announce this via the bus
authorLennart Poettering <lennart@poettering.net>
Thu, 29 Nov 2018 17:48:32 +0000 (18:48 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 1 Dec 2018 11:53:26 +0000 (12:53 +0100)
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.

src/core/job.c

index 2a630356bfa5738bf6994b70c5ac693180c88ef8..61ca6eb433392eab55de3e4e78db8a6c2f1b1cdf 100644 (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;
 }