]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: migration: Set the 'set' boolean in qemuMigrationParamsSetString
authorPeter Krempa <pkrempa@redhat.com>
Fri, 27 Apr 2018 11:17:17 +0000 (13:17 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 27 Apr 2018 13:14:05 +0000 (15:14 +0200)
The code setting TLS parameters verifies that TLS is supported by
looking at the dump of parameters which will be reset after migration,
but sets the parameters in the list of new parameters. As
qemuMigrationParamsSetString did not set the 'set' property, the TLS
parameters would not be used.

This is a regression after the series refactoring migration parameters
and it resulted into TLS not being used even when requested.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_migration_params.c

index c5d7ab901670c00bd328a3ba3545c0a79570b3ed..578cd6671f973e840f98ffeba93ef47eaaa62271 100644 (file)
@@ -777,6 +777,15 @@ qemuMigrationParamsApply(virQEMUDriverPtr driver,
 }
 
 
+/**
+ * qemuMigrationParamsSetString:
+ * @migrParams: migration parameter object
+ * @param: parameter to set
+ * @value: new value
+ *
+ * Enables and sets the migration parameter @param in @migrParams. Returns 0 on
+ * success and -1 on error. Libvirt error is reported.
+ */
 static int
 qemuMigrationParamsSetString(qemuMigrationParamsPtr migParams,
                              qemuMigrationParam param,
@@ -788,6 +797,8 @@ qemuMigrationParamsSetString(qemuMigrationParamsPtr migParams,
     if (VIR_STRDUP(migParams->params[param].value.s, value) < 0)
         return -1;
 
+    migParams->params[param].set = true;
+
     return 0;
 }