提交 85cbe869 编写于 作者: M Michal Privoznik

parallels_sdk: Utilize parallelsDomObjFromDomain()

Instead of each API copying the same lines of code, lets use the
generic function designed just for that purpose.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 d2256fb5
......@@ -1838,11 +1838,8 @@ prlsdkDomainChangeState(virDomainPtr domain,
virDomainObjPtr dom;
int ret = -1;
dom = virDomainObjListFindByUUID(privconn->domains, domain->uuid);
if (dom == NULL) {
parallelsDomNotFoundError(domain);
if (!(dom = parallelsDomObjFromDomain(domain)))
return -1;
}
ret = prlsdkDomainChangeStateLocked(privconn, dom, chstate);
virObjectUnlock(dom);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册