mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
qemu: Disable errors in qemudShutdownVMDaemon
This commit is contained in:
parent
e85065b854
commit
978dd6d48b
@ -2622,12 +2622,17 @@ static void qemudShutdownVMDaemon(virConnectPtr conn,
|
||||
int ret;
|
||||
int retries = 0;
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
virErrorPtr orig_err;
|
||||
|
||||
if (!virDomainObjIsActive(vm))
|
||||
return;
|
||||
|
||||
VIR_DEBUG("Shutting down VM '%s'", vm->def->name);
|
||||
|
||||
/* This method is routinely used in clean up paths. Disable error
|
||||
* reporting so we don't squash a legit error. */
|
||||
orig_err = virSaveLastError();
|
||||
|
||||
if (driver->macFilter) {
|
||||
int i;
|
||||
virDomainDefPtr def = vm->def;
|
||||
@ -2707,6 +2712,11 @@ retry:
|
||||
vm->def->id = -1;
|
||||
vm->newDef = NULL;
|
||||
}
|
||||
|
||||
if (orig_err) {
|
||||
virSetError(orig_err);
|
||||
virFreeError(orig_err);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user