qemu: stop passing in virConnectPtr for looking up networks

When setting up graphics, we sometimes need to resolve networks,
requiring the caller to pass in a virConnectPtr, except sometimes they
pass in NULL. Use virGetConnectNetwork() to acquire the connection to
the network driver when it is needed.

Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé committed 2018-02-19 11:11:47 +00:00
1 parent 6ea0ae9619
commit 6678a44777
5 files changed
+23 -27

No files matched your search

+1 -1
View File
@@ -498,7 +498,7 @@ testCompareXMLToArgv(const void *data)
}
}
if (!(cmd = qemuProcessCreatePretendCmd(conn, &driver, vm, migrateURI,
if (!(cmd = qemuProcessCreatePretendCmd(&driver, vm, migrateURI,
(flags & FLAG_FIPS), false,
VIR_QEMU_PROCESS_START_COLD))) {
if (flags & FLAG_EXPECT_FAILURE)