Commit Graph

10 Commits

Author SHA1 Message Date
Matthias Bolte
8c572b6c78 vbox: Don't leak arrays from XPCOM
XPCOM returns an array as a pointer to an array of pointers to the
actual items. When the array isn't needed anymore the items are
released, but the actual array containing the pointers to the items
was not freed and leaked.

Free the actual array using ComUnallocMem.

This doesn't affect MSCOM as SafeArrayDestroy releases all items
and frees the array.
2010-12-17 23:02:56 +01:00
Matthias Bolte
d5b1933e56 vbox: Handle different array representations of XPCOM and MSCOM
Add a vboxArray to hide the details from the general driver code.
2010-12-17 23:02:33 +01:00
Matthias Bolte
448347f8b0 vbox: Add glue layer for MSCOM on Windows
Don't require dlopen, but link to ole32 and oleaut32 on Windows.

Don't expose g_pVBoxFuncs anymore. It was only used to get the
version of the API. Make VBoxCGlueInit return the version instead.
This simplifies the implementation of the MSCOM glue layer.

Get the VirtualBox version from the registry.

Add a dummy implementation of the nsIEventQueue to the MSCOM glue
as there seems to be no direct equivalent with MSCOM. It might be
implemented using the normal window message loop. This requires
additional investigation.
2010-12-17 22:51:33 +01:00
Daniel P. Berrange
6aff3f2091 Fix memory leaks in audit & VirtualBox code
* src/util/virtaudit.c: Free audit string
* src/vbox/vbox_XPCOMCGlue.c: Free library name
2010-11-29 15:17:16 +00:00
Matthias Bolte
2eb99c4a6c vbox: Don't warn when the linker search path doesn't contain VBoxXPCOMC.so
This is actually a workaround, to unbreak make check on systems
without VirtualBox.
2010-10-29 16:33:31 +02:00
Matthias Bolte
f4a8542dd5 vbox: Stop hardcoding a single path for VBoxXPCOMC.so
This partly reverts df90ca7661.

Don't disable the VirtualBox driver when configure can't find
VBoxXPCOMC.so, rely on detection at runtime again instead.

Keep --with-vbox=/path/to/virtualbox intact, added to for:
https://bugzilla.redhat.com/show_bug.cgi?id=609185

Detection order for VBoxXPCOMC.so:

1. VBOX_APP_HOME environment variable
2. configure provided location
3. hardcoded list of known locations
4. dynamic linker search path

Also cleanup the glue code and improve error reporting.
2010-10-29 15:50:38 +02:00
Matthias Bolte
df90ca7661 vbox: Let configure detect/set the XPCOMC directory
This allows the user to give an explicit path to configure

  ./configure --with-vbox=/path/to/virtualbox

instead of having the VirtualBox driver probe a set of possible
paths at runtime. If no explicit path is specified then configure
probes the set of "known" paths.

https://bugzilla.redhat.com/show_bug.cgi?id=609185
2010-07-03 12:40:14 +02:00
Jim Meyering
07613d2020 remove all trailing blank lines
by running this command:
git ls-files -z | xargs -0 perl -pi -0777 -e 's/\n\n+$/\n/'
This is in preparation for a more strict make syntax-check
rule that will detect trailing blank lines.
2009-07-16 15:06:42 +02:00
Daniel Veillard
9ccdbb5d61 * src/vbox/vbox_XPCOMCGlue.[ch]: improve VirtualBox path detection
patch by Pritesh Kothari
Daniel
2009-05-06 13:23:44 +00:00
Daniel Veillard
10d1650843 integration of the VirtualBox support
* configure.in include/libvirt/virterror.h src/Makefile.am
  src/domain_conf.[ch] src/driver.h src/virterror.c src/vbox/README
  src/vbox/vbox_CAPI_v2_2.h src/vbox/vbox_V2_2.c
  src/vbox/vbox_XPCOMCGlue.[ch] src/vbox/vbox_driver.[ch]
  src/vbox/vbox_tmpl.c: integration of the VirtualBox support
  patches by Pritesh Kothari
Daniel
2009-04-17 16:09:07 +00:00