summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorKai Sommerfeld <kso@openoffice.org>2000-11-02 09:28:47 +0000
committerKai Sommerfeld <kso@openoffice.org>2000-11-02 09:28:47 +0000
commit61c73306eb77c5e9c78474c21c77753e035af1b1 (patch)
tree2483404e88d4142aeffde674fc394d4254c57301 /ucb
parent1373e82a98196c4166d9e153cef298c5f7e0c02a (diff)
Fixed: Deadlocks in listener callbacks.
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/hierarchy/hierarchycontent.cxx13
-rw-r--r--ucb/source/ucp/webdav/webdavcontent.cxx11
2 files changed, 13 insertions, 11 deletions
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index db48c0e15b96..1b0c1bd50a45 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: hierarchycontent.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: kso $ $Date: 2000-10-16 14:54:18 $
+ * last change: $Author: kso $ $Date: 2000-11-02 10:28:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -896,7 +896,7 @@ sal_Bool HierarchyContent::exchangeIdentity(
if ( !xNewId.is() )
return sal_False;
- osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex );
Reference< XContent > xThis = this;
@@ -923,6 +923,7 @@ sal_Bool HierarchyContent::exchangeIdentity(
{
OUString aOldURL = m_xIdentifier->getContentIdentifier();
+ aGuard.clear();
if ( exchange( xNewId ) )
{
if ( m_eKind == FOLDER )
@@ -1263,6 +1264,7 @@ void HierarchyContent::setPropertyValues(
Reference< XContentIdentifier > xOldId = m_xIdentifier;
Reference< XContentIdentifier > xNewId = getIdentifierFromTitle();
+ aGuard.clear();
if ( exchangeIdentity( xNewId ) )
{
// Adapt persistent data.
@@ -1282,7 +1284,6 @@ void HierarchyContent::setPropertyValues(
if ( m_eState == PERSISTENT )
storeData();
- aGuard.clear();
aChanges.realloc( nChanged );
notifyPropertiesChange( aChanges );
}
@@ -1391,7 +1392,7 @@ void HierarchyContent::destroy( sal_Bool bDeletePhysical )
{
// @@@ take care about bDeletePhysical -> trashcan support
- osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex );
Reference< XContent > xThis = this;
@@ -1411,6 +1412,8 @@ void HierarchyContent::destroy( sal_Bool bDeletePhysical )
}
m_eState = DEAD;
+
+ aGuard.clear();
deleted();
if ( m_eKind == FOLDER )
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index 7293d7cf5852..45f57087f58a 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: webdavcontent.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: kso $ $Date: 2000-10-27 08:05:40 $
+ * last change: $Author: kso $ $Date: 2000-11-02 10:28:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1477,6 +1477,7 @@ void Content::setPropertyValues( const Sequence< PropertyValue >& rValues,
// @@@ Existing content should be checked to see if it has
// been overwritten at the target
+ aGuard.clear();
if ( exchangeIdentity( xNewId ) )
{
// Adapt Additional Core Properties.
@@ -1493,9 +1494,6 @@ void Content::setPropertyValues( const Sequence< PropertyValue >& rValues,
if ( nChanged > 0 )
{
- // @@@ Save changes.
- //@@@ storeData();
-
aGuard.clear();
aChanges.realloc( nChanged );
notifyPropertiesChange( aChanges );
@@ -1675,7 +1673,7 @@ sal_Bool Content::exchangeIdentity(
if ( !xNewId.is() )
return sal_False;
- osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex );
Reference< XContent > xThis = this;
@@ -1693,6 +1691,7 @@ sal_Bool Content::exchangeIdentity(
{
OUString aOldURL = m_xIdentifier->getContentIdentifier();
+ aGuard.clear();
if ( exchange( xNewId ) )
{
if ( isFolder() )