Kaydet (Commit) 9da4e469 authored tarafından Matúš Kukan's avatar Matúš Kukan

webdav: fix locking in webdav_ucp::Content::getResourceType()

This commit cherry-picks 49a45422
for serf webdav version.

Change-Id: Ic5aba4fba8f8a2a521224b08865500dd932e85bf
üst ba27300d
......@@ -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: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment