]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libxl: Don't use dom->conn to lookup virNetwork
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 4 Dec 2019 09:18:22 +0000 (10:18 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 17 Dec 2019 15:58:42 +0000 (16:58 +0100)
commit068fd891cd0509708fe15f896031c38c469b94c5
tree99af06bfbd70d0b547cd94b6fd71b4131f124283
parent7be63dbe25f086050c0bc2d3b876de3cbc6fde1e
libxl: Don't use dom->conn to lookup virNetwork

When using the monolithic daemon, then dom->conn has all driver
tables filled in properly and thus it's safe to call an API other
than virDomain*(). However, when using split daemons then
dom->conn has only hypervisor driver table set
(dom->conn->driver) and the rest is NULL. Therefore, if we want
to call a non-domain API (virNetworkLookupByName() in this case),
we have obtain the cached connection object accessible via
virGetConnectNetwork().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
src/libxl/libxl_driver.c