X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fjob.c;h=d304a16d0651e0c652363c7a9d99bcf0101c7709;hb=b42defe3b8ed3947d85db654a6cdb1b9999f394d;hp=af5855b71d6a9c840c94b7cef7e55ee40d877c95;hpb=b92bea5d2a9481de69bb627a7b442a9f58fca43d;p=elogind.git diff --git a/src/core/job.c b/src/core/job.c index af5855b71..d304a16d0 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -569,7 +569,7 @@ int job_run_and_invalidate(Job *j) { return r; } -static const char *job_get_status_message_format(Unit *u, JobType t, JobResult result) { +_pure_ static const char *job_get_status_message_format(Unit *u, JobType t, JobResult result) { const UnitStatusMessageFormats *format_table; assert(u); @@ -588,7 +588,7 @@ static const char *job_get_status_message_format(Unit *u, JobType t, JobResult r return NULL; } -static const char *job_get_status_message_format_try_harder(Unit *u, JobType t, JobResult result) { +_pure_ static const char *job_get_status_message_format_try_harder(Unit *u, JobType t, JobResult result) { const char *format; assert(u); @@ -840,9 +840,11 @@ int job_finish_and_invalidate(Job *j, JobResult result, bool recursive) { job_result_to_string(result), NULL); - unit_trigger_on_failure(u); + unit_start_on_failure(u); } + unit_trigger_notify(u); + finish: /* Try to start the next jobs that can be started */ SET_FOREACH(other, u->dependencies[UNIT_AFTER], i)