Re: [libvirt] Bugfix for failing to reconnect to vbox:///session

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

 



> I don't think this is quite correct. We call VBoxCGlueInit()
> in the vboxRegister() function, which is run when libvirt first
> initializes the whole library.
>
> The real bug is the vboxClose() method which calls vboxUninitialize()
> which is then calling VBoxCGlueTerm(). So if you have many virConectPtr
> objects open, the first one you call virConnectClose on will
> shutdown the entire vbox library, breaking all the other virConnectPtr
> instances you have active.
>
> IMHO, we should simply delete VBoxCGlueTerm() completely.

Right the VBoxCGlueTerm() is causing the whole problem.
Resending the patch with changes as suggested above.

Regards,
Pritesh
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 74c432e..42c5477 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -310,6 +310,7 @@ no_memory:
 }
 
 static int vboxInitialize(virConnectPtr conn, vboxGlobalData *data) {
+
     /* Get the API table for out version, g_pVBoxFuncs is for the oldest
        version of the API that we support so we cannot use that. */
     data->pFuncs = g_pfnGetFunctions(VBOX_XPCOMC_VERSION);
@@ -398,7 +399,6 @@ static void vboxUninitialize(vboxGlobalData *data) {
 
     if (data->pFuncs)
         data->pFuncs->pfnComUninitialize();
-    VBoxCGlueTerm();
 
     virDomainObjListFree(&data->domains);
     virCapabilitiesFree(data->caps);
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[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]