From 8cc99dcdc264bc896926e43e7576c7b7ab633d70 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 18 Jul 2017 12:04:54 +0200 Subject: migration: Clean up around tls_creds, tls_hostname Optional MigrationParameters members tls_creds and tls_hostname can't actually be absent outside qmp_migrate_set_parameters() since commit 4af245d (v2.9.0). Note that commit 4af245d reverted the part of commit de63ab6 (v2.8.0) that made tls_creds and tls_hostname absent instead of "" in the value of query-migrate-parameters, even though commit de63ab6 called that a mistake. What a mess. Drop the redundant tests for presence, and update documentation. Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrange Reviewed-by: Eric Blake Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'migration') diff --git a/migration/migration.c b/migration/migration.c index 7615391..88b9277 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -444,9 +444,9 @@ MigrationParameters *qmp_query_migrate_parameters(Error **errp) params->cpu_throttle_initial = s->parameters.cpu_throttle_initial; params->has_cpu_throttle_increment = true; params->cpu_throttle_increment = s->parameters.cpu_throttle_increment; - params->has_tls_creds = !!s->parameters.tls_creds; + params->has_tls_creds = true; params->tls_creds = g_strdup(s->parameters.tls_creds); - params->has_tls_hostname = !!s->parameters.tls_hostname; + params->has_tls_hostname = true; params->tls_hostname = g_strdup(s->parameters.tls_hostname); params->has_max_bandwidth = true; params->max_bandwidth = s->parameters.max_bandwidth; -- cgit v1.1