mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-03 17:47:15 +03:00
qemuDomainGetStats: Copy domain ID too
One of the problems with our virGetDomain function is that it copies just domain name and domain UUID. Therefore it's very easy to forget aboud domain ID. This can cause some bugs, like virConnectGetAllDomainStats not reporting proper domain IDs. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
2fe93123bf
commit
ca8c36a9e3
@ -19556,6 +19556,9 @@ qemuDomainGetStats(virConnectPtr conn,
|
||||
if (!(tmp->dom = virGetDomain(conn, dom->def->name, dom->def->uuid)))
|
||||
goto cleanup;
|
||||
|
||||
/* We have to copy the domain ID by hand */
|
||||
tmp->dom->id = dom->def->id;
|
||||
|
||||
*record = tmp;
|
||||
tmp = NULL;
|
||||
ret = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user