提交 ca8c36a9 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
上级 2fe93123
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册