From fe39a4d44004408b8c847151191f1948a4aa6570 Mon Sep 17 00:00:00 2001 From: zhanghailiang Date: Wed, 2 Nov 2016 15:42:09 +0800 Subject: migration: fix missing assignment for has_x_checkpoint_delay We forgot to assign true to params->has_x_checkpoint_delay parameter in qmp_query_migrate_parameters. Without this, qmp command 'query-migrate-parameters' doesn't show the default value for x-checkpoint-delay option. This also fixes the fact that HMP was relying on unspecified behavior by reading x_checkpoint_delay without checking has_x_checkpoint_delay. Signed-off-by: zhanghailiang Reviewed-by: Eric Blake Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- hmp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hmp.c') diff --git a/hmp.c b/hmp.c index b5e3f54534..02103dfb75 100644 --- a/hmp.c +++ b/hmp.c @@ -318,6 +318,7 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict) monitor_printf(mon, " %s: %" PRId64 " milliseconds", MigrationParameter_lookup[MIGRATION_PARAMETER_DOWNTIME_LIMIT], params->downtime_limit); + assert(params->has_x_checkpoint_delay); monitor_printf(mon, " %s: %" PRId64, MigrationParameter_lookup[MIGRATION_PARAMETER_X_CHECKPOINT_DELAY], params->x_checkpoint_delay); -- cgit v1.2.3