diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-11-15 12:37:51 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-11-15 12:37:51 +0000 |
commit | d1d10372b2afa5d620e8af69e10285d38fb29413 (patch) | |
tree | 6e00bf63ca08c5051da94d60d9904fcc55fa8d4e /configmgr | |
parent | 55a2b026b09ae803de89915b84126f9a79e54ef7 (diff) |
INTEGRATION: CWS cfglooseends (1.7.30); FILE MERGED
2004/11/08 10:44:30 jb 1.7.30.1: #i36826#,#i31085# Prevent potential crash in flush and refreshAll; correct enableAsync semantics (honor diable in options)
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/treecache/treemanager.cxx | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/configmgr/source/treecache/treemanager.cxx b/configmgr/source/treecache/treemanager.cxx index 65c4a0bc0aea..3bb78ac2c921 100644 --- a/configmgr/source/treecache/treemanager.cxx +++ b/configmgr/source/treecache/treemanager.cxx @@ -2,9 +2,9 @@ * * $RCSfile: treemanager.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: hr $ $Date: 2004-06-18 15:52:11 $ + * last change: $Author: obo $ $Date: 2004-11-15 13:37:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -535,15 +535,10 @@ void TreeManager::saveAndNotifyUpdate(data::Accessor const& _aChangedDataAccesso { CFG_TRACE_INFO("TreeManager: committing an Update to the cache controller"); RequestOptions aOptions = aChangeTree.getOptions();; - //Modify RequestOptions + //Modify RequestOptions - suppress async commit, if disabled if(!m_bEnableAsync) - { aOptions.enableAsync(false); - } - else - { - aOptions.enableAsync(true); - } + backend::UpdateRequest anUpdate( & aChangeTree.root, aChangeTree.getRootNodePath(), @@ -613,16 +608,14 @@ void TreeManager::refreshAll() CFG_UNO_THROW_ALL( ) { //Find what components are in cache and that have client references and reload //such components. - BackendCacheRef aCacheLoaderRef = getCacheLoader(); - OSL_ENSURE(aCacheLoaderRef.is(), "TreeManager::refreshAll : No backend available"); - aCacheLoaderRef->refreshAllComponents(); + BackendCacheRef aCacheRef = maybeGetBackendCache(); + if (aCacheRef.is()) aCacheRef->refreshAllComponents(); } // ---------------------------------------------------------------------------- void TreeManager::flushAll()CFG_NOTHROW() { - BackendCacheRef aCacheLoaderRef = getCacheLoader(); - OSL_ENSURE(aCacheLoaderRef.is(), "TreeManager::flushAll : No backend available"); - aCacheLoaderRef->flushPendingUpdates(); + BackendCacheRef aCacheRef = maybeGetBackendCache(); + if (aCacheRef.is()) aCacheRef->flushPendingUpdates(); } //----------------------------------------------------------------------------- void TreeManager::enableAsync(const sal_Bool& bEnableAsync) CFG_NOTHROW() |