ucb/source/ucp/gio/gio_provider.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
New commits: commit cacb3861ab9c06fec02189f26f9f3988c0b6cdbe Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Mon Jan 20 19:34:34 2020 +0000 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Tue Jan 21 09:17:24 2020 +0100 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/+/87111 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/ucb/source/ucp/gio/gio_provider.cxx b/ucb/source/ucp/gio/gio_provider.cxx index e9986207971f..92302c2caedf 100644 --- a/ucb/source/ucp/gio/gio_provider.cxx +++ b/ucb/source/ucp/gio/gio_provider.cxx @@ -115,14 +115,29 @@ 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 char *pImplName, void *pServiceManager, void * ) { void * pRet = nullptr; + static bool bDisabled = isDisabled(); + if (bDisabled) + return nullptr; + css::uno::Reference< css::lang::XMultiServiceFactory > xSMgr (static_cast< css::lang::XMultiServiceFactory * >( pServiceManager ) ); css::uno::Reference< css::lang::XSingleServiceFactory > xFactory; + #if !GLIB_CHECK_VERSION(2,36,0) g_type_init(); #endif _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits