aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-08-01 11:18:04 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-08-01 11:18:04 -0500
commitd5a2bcf70e81b67cbc4947f5065db8fc9bfc1465 (patch)
treebeaf71835b892d1ec11d4394ab701db6e87e2d84
parentf44c5c6794026fc2852c1c0f026b15733560ce7c (diff)
parent8c0426aed1d2279845e6a2c3355da8b5d9926cb6 (diff)
Merge remote-tracking branch 'luiz/queue/qmp' into staging
# By Pawit Pornkitprasan # Via Luiz Capitulino * luiz/queue/qmp: migration: don't use uninitialized variables migration: send total time in QMP at "completed" stage Message-id: 1375367564-4797-1-git-send-email-lcapitulino@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--migration.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/migration.c b/migration.c
index 9fc72943fb..1402fa7680 100644
--- a/migration.c
+++ b/migration.c
@@ -231,6 +231,7 @@ MigrationInfo *qmp_query_migrate(Error **errp)
info->has_status = true;
info->status = g_strdup("completed");
+ info->has_total_time = true;
info->total_time = s->total_time;
info->has_downtime = true;
info->downtime = s->downtime;
@@ -399,8 +400,8 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
MigrationParams params;
const char *p;
- params.blk = blk;
- params.shared = inc;
+ params.blk = has_blk && blk;
+ params.shared = has_inc && inc;
if (s->state == MIG_STATE_ACTIVE || s->state == MIG_STATE_SETUP) {
error_set(errp, QERR_MIGRATION_ACTIVE);