summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-09-26 22:30:11 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-09-26 22:30:11 +0200
commit2eb36dc4b846ab5886ae71fd2978b56b2a2d1d08 (patch)
tree8f97136d37f2bb9407249f624f989b9a28f2a3b6 /ucb
parentff0bd9ff42bd6fe6ab7f8667c256c952aa261809 (diff)
Hack to not leave SolarMutex released after g_main_loop_run call
Change-Id: I26923469d08308233ce3fabe749806c16d75cecd
Diffstat (limited to 'ucb')
-rw-r--r--ucb/Library_ucpgio1.mk1
-rw-r--r--ucb/source/ucp/gio/gio_content.cxx11
2 files changed, 11 insertions, 1 deletions
diff --git a/ucb/Library_ucpgio1.mk b/ucb/Library_ucpgio1.mk
index eb39c8e2c10b..000f55727da2 100644
--- a/ucb/Library_ucpgio1.mk
+++ b/ucb/Library_ucpgio1.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_Library_use_libraries,ucpgio1,\
sal \
salhelper \
ucbhelper \
+ vcl \
))
$(eval $(call gb_Library_use_externals,ucpgio1,\
diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx
index 8621782cf7ba..f7ce5f94a822 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -62,6 +62,7 @@
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/interactionrequest.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
+#include <vcl/svapp.hxx>
#include <osl/conditn.hxx>
@@ -325,7 +326,15 @@ void MountOperation::Completed(GObject *source, GAsyncResult *res, gpointer user
GError *MountOperation::Mount(GFile *pFile)
{
g_file_mount_enclosing_volume(pFile, G_MOUNT_MOUNT_NONE, mpAuthentication, NULL, MountOperation::Completed, this);
- g_main_loop_run(mpLoop);
+ {
+ //HACK: At least the gdk_threads_set_lock_functions(GdkThreadsEnter,
+ // GdkThreadsLeave) call in vcl/unx/gtk/app/gtkinst.cxx will lead to
+ // GdkThreadsLeave unlock the SolarMutex down to zero at the end of
+ // g_main_loop_run, so we need ~SolarMutexReleaser to raise it back to
+ // the original value again:
+ SolarMutexReleaser rel;
+ g_main_loop_run(mpLoop);
+ }
return mpError;
}