]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Fix virDomainObjGetDefs when getting persistent config on a live vm
authorPeter Krempa <pkrempa@redhat.com>
Fri, 12 Jun 2015 12:37:18 +0000 (14:37 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 18 Jun 2015 13:13:44 +0000 (15:13 +0200)
commit63aaf69bbe263aae0247b2cf51133854185e9b94
tree863856b91efdb8963051b3de32ee4ba54eb9d113
parentf486bb0494f71d316639ccc57141698d34e5101a
conf: Fix virDomainObjGetDefs when getting persistent config on a live vm

If @flags contains only VIR_DOMAIN_AFFECT_CONFIG and @vm is active, the
function would return the active config rather than the persistent one
that it should return. This happened due to the fact that
virDomainObjGetDefs was checking the updated flags which may not contain
VIR_DOMAIN_AFFECT_LIVE if it is not requested even if @vm is active.

Additionally the function would not take the flags into account when
setting the pointers which was later used to determine whether the code
needs to update the given configuration.

The mistake was caught by the virt-test suite.
src/conf/domain_conf.c