]> xenbits.xensource.com Git - libvirt.git/commitdiff
virLXCProcessAutostartAll: Remove unused 'conn'
authorPeter Krempa <pkrempa@redhat.com>
Tue, 28 Jun 2022 14:45:01 +0000 (16:45 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 22 Jul 2022 09:11:42 +0000 (11:11 +0200)
The connection object is not needed when autostarting containers so we
can remove the machinery for it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
src/lxc/lxc_process.c

index 130c16aa04b41635de35d11ede99fd18b4e84bc1..a733f146f4bb43ea373580d639fcf15e3ed6024e 100644 (file)
@@ -1540,7 +1540,6 @@ int virLXCProcessStart(virLXCDriver * driver,
 
 struct virLXCProcessAutostartData {
     virLXCDriver *driver;
-    virConnectPtr conn;
 };
 
 static int
@@ -1576,21 +1575,11 @@ virLXCProcessAutostartDomain(virDomainObj *vm,
 void
 virLXCProcessAutostartAll(virLXCDriver *driver)
 {
-    /* XXX: Figure out a better way todo this. The domain
-     * startup code needs a connection handle in order
-     * to lookup the bridge associated with a virtual
-     * network
-     */
-    virConnectPtr conn = virConnectOpen("lxc:///system");
-    /* Ignoring NULL conn which is mostly harmless here */
-
-    struct virLXCProcessAutostartData data = { driver, conn };
+    struct virLXCProcessAutostartData data = { driver };
 
     virDomainObjListForEach(driver->domains, false,
                             virLXCProcessAutostartDomain,
                             &data);
-
-    virObjectUnref(conn);
 }