summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-08-16 11:02:59 +0200
committerGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-08-16 10:40:03 +0000
commit1ed01e1bcc929d363ad5f3c4d2cf262a20134412 (patch)
tree725fabdd0418212de8de5f7980eb926bfc686acc
parent174c064b0409de94472a5a46f29f740525513506 (diff)
tdf#101094 (24): Simplify cache removal: DESTROY, PROPPATCH, MOVE
Plus another PUT forgotten on a previuos commit. Change-Id: I9e15cae2e858884cfd4c827ae767a2c5fcef1782 Reviewed-on: https://gerrit.libreoffice.org/28158 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
-rw-r--r--ucb/source/ucp/webdav-neon/webdavcontent.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 55cbd83957b9..daae5fcda8f6 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -566,6 +566,7 @@ uno::Any SAL_CALL Content::execute(
osl::Guard< osl::Mutex > aGuard( m_aMutex );
xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) );
}
+ aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() );
xResAccess->DESTROY( Environment );
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
@@ -853,6 +854,7 @@ void Content::addProperty( const ucb::PropertyCommandArgument& aCmdArg,
osl::Guard< osl::Mutex > aGuard( m_aMutex );
xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) );
}
+ aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() );
xResAccess->PROPPATCH( aProppatchValues, xEnv );
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
@@ -945,6 +947,7 @@ void Content::removeProperty( const OUString& Name,
osl::Guard< osl::Mutex > aGuard( m_aMutex );
xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) );
}
+ aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() );
xResAccess->PROPPATCH( aProppatchValues, xEnv );
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
@@ -1870,6 +1873,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
try
{
// Set property values at server.
+ aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() );
xResAccess->PROPPATCH( aProppatchValues, xEnv );
// TODO PLACEHOLDER:
// remove target URL options from cache, since PROPPATCH may change it
@@ -1919,10 +1923,10 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
targetURI.SetScheme( sourceURI.GetScheme() );
- xResAccess->MOVE(
- sourceURI.GetPath(), targetURI.GetURI(), false, xEnv );
aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
+ xResAccess->MOVE(
+ sourceURI.GetPath(), targetURI.GetURI(), false, xEnv );
// @@@ Should check for resources that could not be moved
// (due to source access or target overwrite) and send
@@ -1957,8 +1961,6 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
}
catch ( DAVException const & e )
{
- aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
- aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
// Do not set new title!
aNewTitle.clear();
@@ -2588,14 +2590,13 @@ void Content::insert(
OUString aTargetUrl = xResAccess->getURL();
try
{
- xResAccess->PUT( xInputStream, Environment );
// remove options from cache, PUT may change it
// it will be refreshed when needed
aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl );
+ xResAccess->PUT( xInputStream, Environment );
}
catch ( DAVException const & e )
{
- aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl );
cancelCommandExecution( e, Environment, true );
// Unreachable
}