chiark / gitweb /
mount: Remove double include of "mount.h"
[elogind.git] / src / job.c
index 7b20987c4adec8e8361003098f239dedc6e1d1cd..c219b0d18ba926fb5c1871a3871306c0e7af3f2c 100644 (file)
--- a/src/job.c
+++ b/src/job.c
@@ -478,9 +478,13 @@ int job_finish_and_invalidate(Job *j, bool success) {
                 return 0;
         }
 
+        j->failed = !success;
+
         log_debug("Job %s/%s finished, success=%s", j->unit->meta.id, job_type_to_string(j->type), yes_no(success));
 
-        j->failed = !success;
+        if (j->failed)
+                j->manager->n_failed_jobs ++;
+
         u = j->unit;
         t = j->type;
         job_free(j);
@@ -540,6 +544,8 @@ int job_finish_and_invalidate(Job *j, bool success) {
                 if (other->meta.job)
                         job_add_to_run_queue(other->meta.job);
 
+        manager_check_finished(u->meta.manager);
+
         return 0;
 }