diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2020-01-20 19:34:34 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2020-01-20 22:15:28 +0100 |
commit | 1c081112714e6722f2d9541e9684107526478a39 (patch) | |
tree | 54f0993ee94e47075f33a384489739fb92947665 /ucb | |
parent | 29ea62fbf5a2e8bebb9501ff7e969298dbfbc0a6 (diff) |
lok: disable ucbgio provider for Online.
Of course, some lok apps may want the provider, but it creates
unwanted threads causing problems with forkit in some cases.
Change-Id: I7d19d629b3657780b52c3c753a4c8dcba6ae86b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87098
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/gio/gio_provider.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ucb/source/ucp/gio/gio_provider.cxx b/ucb/source/ucp/gio/gio_provider.cxx index d68a3bc59984..5b94d9a5374c 100644 --- a/ucb/source/ucp/gio/gio_provider.cxx +++ b/ucb/source/ucp/gio/gio_provider.cxx @@ -120,11 +120,25 @@ ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider ); } +// gio creates threads we don't want in online's forkit +static bool isDisabled() +{ + const char *pDisable = getenv("UNODISABLELIBRARY"); + if (!pDisable) + return false; + OString aDisable(pDisable, strlen(pDisable)); + return aDisable.indexOf("ucpgio1") >= 0; +} + extern "C" SAL_DLLPUBLIC_EXPORT void * ucpgio1_component_getFactory( const sal_Char *pImplName, void *pServiceManager, void * ) { void * pRet = nullptr; + static bool bDisabled = isDisabled(); + if (bDisabled) + return nullptr; + uno::Reference< lang::XMultiServiceFactory > xSMgr (static_cast< lang::XMultiServiceFactory * >( pServiceManager ) ); uno::Reference< lang::XSingleServiceFactory > xFactory; |