qemu: migration: Set the 'set' boolean in qemuMigrationParamsSetString

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>
This commit is contained in:
Peter Krempa 2018-04-27 13:17:17 +02:00
parent d49c6e4623
commit 96fc9fc509

View 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;
}