---
src/vbox/vbox_common.c | 11 +++++++++++
src/vbox/vbox_tmpl.c | 29 -----------------------------
src/vbox/vbox_uniformed_api.h | 1 +
3 files changed, 12 insertions(+), 29 deletions(-)
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 8fb4494..2e23d62 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -287,3 +287,14 @@ virDrvOpenStatus vboxConnectOpen(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
+
+int vboxConnectClose(virConnectPtr conn)
+{
+ vboxGlobalData *data = conn->privateData;
+ VIR_DEBUG("%s: in vboxClose", conn->driver->name);
+
+ vboxUninitialize(data);
+ conn->privateData = NULL;
+
+ return 0;
+}
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index cc1733b..f6890d2 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -831,35 +831,6 @@ vboxSocketParseAddrUtf16(vboxGlobalData *data, const PRUnichar
*utf16,
return result;
}
-static void vboxUninitialize(vboxGlobalData *data)
-{
- if (!data)
- return;
-
- if (data->pFuncs)
- data->pFuncs->pfnComUninitialize();
-
- virObjectUnref(data->caps);
- virObjectUnref(data->xmlopt);
-#if VBOX_API_VERSION == 2002000
- /* No domainEventCallbacks in 2.2.* version */
-#else /* !(VBOX_API_VERSION == 2002000) */
- virObjectEventStateFree(data->domainEvents);
-#endif /* !(VBOX_API_VERSION == 2002000) */
- VIR_FREE(data);
-}
-
-static int vboxConnectClose(virConnectPtr conn)
-{
- vboxGlobalData *data = conn->privateData;
- VIR_DEBUG("%s: in vboxClose", conn->driver->name);
-
- vboxUninitialize(data);
- conn->privateData = NULL;
-
- return 0;
-}
-
static int vboxConnectGetVersion(virConnectPtr conn, unsigned long *version)
{
vboxGlobalData *data = conn->privateData;
diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h
index fa753d4..2eda247 100644
--- a/src/vbox/vbox_uniformed_api.h
+++ b/src/vbox/vbox_uniformed_api.h
@@ -134,6 +134,7 @@ typedef struct {
virDrvOpenStatus vboxConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth,
unsigned int flags);
+int vboxConnectClose(virConnectPtr conn);
/* Version specified functions for installing uniformed API */
void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI);
--
1.7.9.5