diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-07-08 09:00:51 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-07-08 09:37:08 +0200 |
commit | 8b568c19a68d080685cf5a429dbe08263e8e6cee (patch) | |
tree | 6cd06672fb98ea0f848167fc59a926245fc730bf /ucb | |
parent | 3997f7b8e5f07312466e66f6bcf0a4ac1c8c5a39 (diff) |
webdav: fix locking in webdav_ucp::Content::getResourceType()
This commit cherry-picks 49a454225e35699d7351faaba3d296e1858c6107
for serf webdav version.
Change-Id: Ic5aba4fba8f8a2a521224b08865500dd932e85bf
(cherry picked from commit 9da4e46957bd1a69c4339eeb1d107546c400e6e3)
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontent.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index f053874e9a9b..e67b65ef3318 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -3448,7 +3448,17 @@ const Content::ResourceType & Content::getResourceType( const uno::Reference< ucb::XCommandEnvironment >& xEnv ) throw ( uno::Exception ) { - return getResourceType( xEnv, m_xResAccess ); + boost::scoped_ptr< DAVResourceAccess > xResAccess; + { + osl::MutexGuard aGuard( m_aMutex ); + xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) ); + } + const Content::ResourceType & ret = getResourceType( xEnv, xResAccess ); + { + osl::Guard< osl::Mutex > aGuard( m_aMutex ); + m_xResAccess.reset( new DAVResourceAccess( *xResAccess.get() ) ); + } + return ret; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |