if (r < 0)
return r;
- if (FLAGS_SET(flags, BUS_UNIT_QUEUE_RETURN_SKIP_ON_CONDITION_FAIL))
- j->return_skip_on_cond_failure = true;
-
r = bus_job_track_sender(j, message);
if (r < 0)
return r;
typedef enum BusUnitQueueFlags {
BUS_UNIT_QUEUE_RELOAD_IF_POSSIBLE = 1 << 0,
BUS_UNIT_QUEUE_VERBOSE_REPLY = 1 << 1,
- BUS_UNIT_QUEUE_RETURN_SKIP_ON_CONDITION_FAIL = 1 << 2, // FIXME: currently not used, will be changed soon
} BusUnitQueueFlags;
int bus_unit_queue_job_one(
job_set_state(j, JOB_WAITING); /* Hmm, not ready after all, let's return to JOB_WAITING state */
else if (r == -EALREADY) /* already being executed */
r = job_finish_and_invalidate(j, JOB_DONE, true, true);
- else if (r == -ECOMM) /* condition failed, but all is good. Return 'skip' if caller requested it. */
- r = job_finish_and_invalidate(j, j->return_skip_on_cond_failure ? JOB_SKIPPED : JOB_DONE, true, false);
+ else if (r == -ECOMM)
+ r = job_finish_and_invalidate(j, JOB_DONE, true, false);
else if (r == -EBADR)
r = job_finish_and_invalidate(j, JOB_SKIPPED, true, false);
else if (r == -ENOEXEC)
bool irreversible:1;
bool in_gc_queue:1;
bool ref_by_private_bus:1;
- bool return_skip_on_cond_failure:1;
};
Job* job_new(Unit *unit, JobType type);