X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjob.c;h=0a9ce153f697a9521b5b53efd32d51ee19d9b1f8;hb=f4579ce704b9db0358b90c282da9536410a4df5a;hp=31e9cfe8d6f937ddf7973548c599f2c0d64283cb;hpb=032ff4afc953cae076ce0ee6a0b85020eeb1a75a;p=elogind.git diff --git a/src/job.c b/src/job.c index 31e9cfe8d..0a9ce153f 100644 --- a/src/job.c +++ b/src/job.c @@ -76,6 +76,7 @@ void job_free(Job *j) { if (j->in_dbus_queue) LIST_REMOVE(Job, dbus_queue, j->manager->dbus_job_queue, j); + free(j->bus_client); free(j); } @@ -482,6 +483,9 @@ int job_finish_and_invalidate(Job *j, bool success) { t = j->type; job_free(j); + if (!success) + unit_status_printf(u, "Starting %s " ANSI_HIGHLIGHT_ON "failed" ANSI_HIGHLIGHT_OFF ".\n", unit_description(u)); + /* Fail depending jobs on failure */ if (!success) { @@ -544,10 +548,9 @@ void job_add_to_dbus_queue(Job *j) { if (j->in_dbus_queue) return; - if (set_isempty(j->manager->subscribed)) { - j->sent_dbus_new_signal = true; - return; - } + /* We don't check if anybody is subscribed here, since this + * job might just have been created and not yet assigned to a + * connection/client. */ LIST_PREPEND(Job, dbus_queue, j->manager->dbus_job_queue, j); j->in_dbus_queue = true;