summaryrefslogtreecommitdiff
path: root/ucb/source/core/ucbstore.cxx
diff options
context:
space:
mode:
authorKai Sommerfeld <kso@openoffice.org>2000-12-21 08:23:35 +0000
committerKai Sommerfeld <kso@openoffice.org>2000-12-21 08:23:35 +0000
commit76c92d6c36b3c09c4eaa38fd742296c0c2f66243 (patch)
tree4ee9f0af98794d4468e4fa3ad2c9fe61011cd2c9 /ucb/source/core/ucbstore.cxx
parenta7543e8ee3595e813eb174c20ee7b541aaa78764 (diff)
#82494# - Workaround to reduce CPU load in case config data are broken.
Diffstat (limited to 'ucb/source/core/ucbstore.cxx')
-rw-r--r--ucb/source/core/ucbstore.cxx30
1 files changed, 27 insertions, 3 deletions
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index d74b236a74e1..08bde168cdd2 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ucbstore.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: kso $ $Date: 2000-12-10 15:13:04 $
+ * last change: $Author: kso $ $Date: 2000-12-21 09:23:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -333,9 +333,13 @@ struct PropertySetRegistry_Impl
Reference< XInterface > m_xRootReadAccess;
Reference< XInterface > m_xRootWriteAccess;
osl::Mutex m_aMutex;
+ sal_Bool m_bTriedToGetRootReadAccess; // #82494#
+ sal_Bool m_bTriedToGetRootWriteAccess; // #82494#
PropertySetRegistry_Impl( UcbStore& rCreator )
- : m_pCreator( &rCreator )
+ : m_pCreator( &rCreator ),
+ m_bTriedToGetRootReadAccess( sal_False ),
+ m_bTriedToGetRootWriteAccess( sal_False )
{
m_pCreator->acquire();
}
@@ -1296,6 +1300,14 @@ Reference< XInterface > PropertySetRegistry::getRootConfigReadAccess()
if ( !m_pImpl->m_xRootReadAccess.is() )
{
+ if ( m_pImpl->m_bTriedToGetRootReadAccess ) // #82494#
+ {
+ OSL_ENSURE( sal_False,
+ "PropertySetRegistry::getRootConfigReadAccess - "
+ "Unable to read any config data! -> #82494#" );
+ return Reference< XInterface >();
+ }
+
getConfigProvider();
if ( m_pImpl->m_xConfigProvider.is() )
@@ -1304,6 +1316,8 @@ Reference< XInterface > PropertySetRegistry::getRootConfigReadAccess()
aArguments[ 0 ] <<= OUString::createFromAscii(
STORE_CONTENTPROPERTIES_KEY );
+ m_pImpl->m_bTriedToGetRootReadAccess = sal_True;
+
m_pImpl->m_xRootReadAccess =
m_pImpl->m_xConfigProvider->createInstanceWithArguments(
OUString::createFromAscii(
@@ -1345,6 +1359,14 @@ Reference< XInterface > PropertySetRegistry::getConfigWriteAccess(
if ( !m_pImpl->m_xRootWriteAccess.is() )
{
+ if ( m_pImpl->m_bTriedToGetRootWriteAccess ) // #82494#
+ {
+ OSL_ENSURE( sal_False,
+ "PropertySetRegistry::getConfigWriteAccess - "
+ "Unable to write any config data! -> #82494#" );
+ return Reference< XInterface >();
+ }
+
getConfigProvider();
if ( m_pImpl->m_xConfigProvider.is() )
@@ -1353,6 +1375,8 @@ Reference< XInterface > PropertySetRegistry::getConfigWriteAccess(
aArguments[ 0 ] <<= OUString::createFromAscii(
STORE_CONTENTPROPERTIES_KEY );
+ m_pImpl->m_bTriedToGetRootWriteAccess = sal_True;
+
m_pImpl->m_xRootWriteAccess =
m_pImpl->m_xConfigProvider->createInstanceWithArguments(
OUString::createFromAscii(