qemu: Fix job handling in qemuDomainSetMetadata

The code modifies the domain configuration but doesn't take a MODIFY
type job to do so.
This commit is contained in:
Peter Krempa 2015-01-22 09:56:38 +01:00
parent fb2ed975c3
commit d13f56f08a

View File

@ -17306,10 +17306,15 @@ qemuDomainSetMetadata(virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false))) if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup; goto cleanup;
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
ret = virDomainObjSetMetadata(vm, type, metadata, key, uri, caps, ret = virDomainObjSetMetadata(vm, type, metadata, key, uri, caps,
driver->xmlopt, cfg->stateDir, driver->xmlopt, cfg->stateDir,
cfg->configDir, flags); cfg->configDir, flags);
qemuDomainObjEndJob(driver, vm);
cleanup: cleanup:
qemuDomObjEndAPI(&vm); qemuDomObjEndAPI(&vm);
virObjectUnref(caps); virObjectUnref(caps);