diff options
Diffstat (limited to 'job.c')
-rw-r--r-- | job.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -568,7 +568,7 @@ void job_user_resume(Job *job, Error **errp) job_resume(job); } -void job_do_dismiss(Job *job) +static void job_do_dismiss(Job *job) { assert(job); job->busy = false; @@ -581,6 +581,19 @@ void job_do_dismiss(Job *job) job_unref(job); } +void job_dismiss(Job **jobptr, Error **errp) +{ + Job *job = *jobptr; + /* similarly to _complete, this is QMP-interface only. */ + assert(job->id); + if (job_apply_verb(job, JOB_VERB_DISMISS, errp)) { + return; + } + + job_do_dismiss(job); + *jobptr = NULL; +} + void job_early_fail(Job *job) { assert(job->status == JOB_STATUS_CREATED); |