On Tue, Oct 11, 2016 at 03:44:45PM -0400, Dawid Zamirski wrote:
On Tue, 2016-10-11 at 10:58 -0400, Dawid Zamirski wrote:
On Tue, 2016-10-11 at 16:22 +0200, Martin Kletzander wrote:
> On Wed, Sep 28, 2016 at 01:41:35PM -0400, Dawid Zamirski wrote:

> I don't understand how vbox works, but if initializing
> g_pVBoxGlobalData
> does not make any connection, and ISession does (which would make
> sense), we could keep the global data around and add ISession for
> each connection.  I guess that's something you're talking about
> below.

Neither I'm super familiar with vbox internals, but your suggestion
sounds reasonable, so I'll dive into that code in vbox source to find

So after a quick glance at vbox initalization code, it seems that both
IVirtualBox and ISession are reference counted global instances
(g_VirtualBox and g_Session [1]) and both are allocated and released in
pfnComInitialize [2] and pfnComUninitialize [3]  implementation calls.
As such I won't be able to separate out ISession instances to be per-
connection while keeping global IVirtualBox reference.

I don't see any reference counting from their side.  Anyway, it looks
like we cannot separate them, but we can get rid of them when we stop
supporting the old version that has only the legacy initialization

It's super-weird that they have global variable AND they still need to
get that passed.  It's like a combination of wrong and non-reentrant
design.  Anyway, they call it legacy, so I guess we should move to the
new one if possible.  But I think you already mentioned that, I'm just
not sure.

[1] https://github.com/mdaniel/virtualbox-org-svn-vbox-trunk/blob/maste
[2] https://github.com/mdaniel/virtualbox-org-svn-vbox-trunk/blob/maste
[3] https://github.com/mdaniel/virtualbox-org-svn-vbox-trunk/blob/maste

Attachment: signature.asc
Description: Digital signature

libvir-list mailing list

Reply via email to