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:14:57 +0200 |
commit | 9da4e46957bd1a69c4339eeb1d107546c400e6e3 (patch) | |
tree | 5d8403cab32d069f966a519a565964fc91261b1e /ucb | |
parent | ba27300d419786ca6fa8a7df950d01f472de3314 (diff) |
webdav: fix locking in webdav_ucp::Content::getResourceType()
This commit cherry-picks 49a454225e35699d7351faaba3d296e1858c6107
for serf webdav version.
Change-Id: Ic5aba4fba8f8a2a521224b08865500dd932e85bf
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 faca5653cfa3..3829a0c1e28d 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -3410,7 +3410,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: */ |