mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 09:53:10 +00:00
qemu: Check if domain is active in GetControlInfo
Reporting status of a control connection makes no sense for an inactive domain. https://bugzilla.redhat.com/show_bug.cgi?id=1281706 Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
1a0f076dd6
commit
e53f2dc875
@ -2763,6 +2763,12 @@ qemuDomainGetControlInfo(virDomainPtr dom,
|
||||
if (virDomainGetControlInfoEnsureACL(dom->conn, vm->def) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (!virDomainObjIsActive(vm)) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("domain is not running"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
priv = vm->privateData;
|
||||
|
||||
memset(info, 0, sizeof(*info));
|
||||
|
Loading…
Reference in New Issue
Block a user