aboutsummaryrefslogtreecommitdiff
path: root/job-qmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'job-qmp.c')
-rw-r--r--job-qmp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/job-qmp.c b/job-qmp.c
index 34c4da094f..829a28aa70 100644
--- a/job-qmp.c
+++ b/job-qmp.c
@@ -144,16 +144,20 @@ void qmp_job_dismiss(const char *id, Error **errp)
static JobInfo *job_query_single(Job *job, Error **errp)
{
JobInfo *info;
+ uint64_t progress_current;
+ uint64_t progress_total;
assert(!job_is_internal(job));
+ progress_get_snapshot(&job->progress, &progress_current,
+ &progress_total);
info = g_new(JobInfo, 1);
*info = (JobInfo) {
.id = g_strdup(job->id),
.type = job_type(job),
.status = job->status,
- .current_progress = job->progress.current,
- .total_progress = job->progress.total,
+ .current_progress = progress_current,
+ .total_progress = progress_total,
.has_error = !!job->err,
.error = job->err ? \
g_strdup(error_get_pretty(job->err)) : NULL,