]> git.ipfire.org Git - thirdparty/libvirt.git/commit
vz: Use virDomainObjListFindBy{UUID|ID}Ref
authorJohn Ferlan <jferlan@redhat.com>
Fri, 9 Mar 2018 15:30:47 +0000 (10:30 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 20 Apr 2018 12:11:14 +0000 (08:11 -0400)
commit3c66d5108f9a8b76dba18c03ba4caf87bc285f21
tree30bea2e32d421e320ea23df95546af03537ed3f0
parentd758374de2f7ce3ec569f216fea80f833e782bd3
vz: Use virDomainObjListFindBy{UUID|ID}Ref

For vzDomainLookupByID and vzDomainLookupByUUID let's
return a locked and referenced @vm object so that callers
can then use the common and more consistent virDomainObjEndAPI
in order to handle cleanup rather than needing to know that the
returned object is locked and calling virObjectUnlock.

The LookupByName already returns the ref counted and locked object,
so this will make things more consistent.

Also adjust the prlsdkHandle{VmState|VmRemoved|Perf}Event APIs
in the same manner.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
src/vz/vz_driver.c
src/vz/vz_sdk.c