diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2012-04-23 01:24:04 +0200 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2012-04-24 01:54:15 +0200 |
commit | 39a18c60d07319ebfcfd476556729c2cadd616d6 (patch) | |
tree | b29036c82f9ae41e1366fea752f9e74ab0a1b29e /src/core/dbus-job.c | |
parent | 1b9cea0caa85dce6d9f117638a296b141c49a8fd (diff) |
job: serialize jobs properly
Jobs were not preserved correctly over a daemon-reload operation.
A systemctl process waiting for a job completion received a job removal
signal. The job itself changed its id. The job timeout started ticking all
over again.
This fixes the deficiencies.
Diffstat (limited to 'src/core/dbus-job.c')
-rw-r--r-- | src/core/dbus-job.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/dbus-job.c b/src/core/dbus-job.c index ef839ffb55..4b20d495eb 100644 --- a/src/core/dbus-job.c +++ b/src/core/dbus-job.c @@ -232,7 +232,7 @@ static int job_send_message(Job *j, DBusMessage* (*new_message)(Job *j)) { assert(j); assert(new_message); - if (bus_has_subscriber(j->manager)) { + if (bus_has_subscriber(j->manager) || j->forgot_bus_clients) { m = new_message(j); if (!m) goto oom; @@ -347,7 +347,7 @@ void bus_job_send_change_signal(Job *j) { j->in_dbus_queue = false; } - if (!bus_has_subscriber(j->manager) && !j->bus_client_list) { + if (!bus_has_subscriber(j->manager) && !j->bus_client_list && !j->forgot_bus_clients) { j->sent_dbus_new_signal = true; return; } @@ -366,7 +366,7 @@ oom: void bus_job_send_removed_signal(Job *j) { assert(j); - if (!bus_has_subscriber(j->manager) && !j->bus_client_list) + if (!bus_has_subscriber(j->manager) && !j->bus_client_list && !j->forgot_bus_clients) return; if (!j->sent_dbus_new_signal) |