[PATCH 4/7] virLXCProcessAutostartAll: Remove unused 'conn'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The connection object is not needed when autostarting containers so we
can remove the machinery for it.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/lxc/lxc_process.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 130c16aa04..a733f146f4 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -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);
 }


-- 
2.36.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux