diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-02-24 02:36:34 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-02-24 02:36:34 +0100 |
commit | 5d44db4a905c62d6cf0dfabbf61df49621efec22 (patch) | |
tree | 0bf5cecb59eaf0e55e29a3f0b77fc69ce6f15c55 /src/unit.c | |
parent | ccc80078fe47395ffe0dd48cb6c81551d991ef4b (diff) | |
download | systemd-5d44db4a905c62d6cf0dfabbf61df49621efec22.tar.gz |
dbus: pass along information why a job failed when it failed (dbus api change!)
Diffstat (limited to 'src/unit.c')
-rw-r--r-- | src/unit.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/unit.c b/src/unit.c index 0d5312376c..1ca8e82af7 100644 --- a/src/unit.c +++ b/src/unit.c @@ -1123,12 +1123,12 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su case JOB_VERIFY_ACTIVE: if (UNIT_IS_ACTIVE_OR_RELOADING(ns)) - job_finish_and_invalidate(u->meta.job, true); + job_finish_and_invalidate(u->meta.job, JOB_DONE); else if (u->meta.job->state == JOB_RUNNING && ns != UNIT_ACTIVATING) { unexpected = true; if (UNIT_IS_INACTIVE_OR_FAILED(ns)) - job_finish_and_invalidate(u->meta.job, ns != UNIT_FAILED); + job_finish_and_invalidate(u->meta.job, ns == UNIT_FAILED ? JOB_FAILED : JOB_DONE); } break; @@ -1138,12 +1138,12 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su if (u->meta.job->state == JOB_RUNNING) { if (ns == UNIT_ACTIVE) - job_finish_and_invalidate(u->meta.job, reload_success); + job_finish_and_invalidate(u->meta.job, reload_success ? JOB_DONE : JOB_FAILED); else if (ns != UNIT_ACTIVATING && ns != UNIT_RELOADING) { unexpected = true; if (UNIT_IS_INACTIVE_OR_FAILED(ns)) - job_finish_and_invalidate(u->meta.job, ns != UNIT_FAILED); + job_finish_and_invalidate(u->meta.job, ns == UNIT_FAILED ? JOB_FAILED : JOB_DONE); } } @@ -1154,10 +1154,10 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su case JOB_TRY_RESTART: if (UNIT_IS_INACTIVE_OR_FAILED(ns)) - job_finish_and_invalidate(u->meta.job, true); + job_finish_and_invalidate(u->meta.job, JOB_DONE); else if (u->meta.job->state == JOB_RUNNING && ns != UNIT_DEACTIVATING) { unexpected = true; - job_finish_and_invalidate(u->meta.job, false); + job_finish_and_invalidate(u->meta.job, JOB_FAILED); } break; |