ucb/source/ucp/webdav/webdavcontent.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
New commits: commit 9da4e46957bd1a69c4339eeb1d107546c400e6e3 Author: Matúš Kukan <matus.ku...@collabora.com> Date: Tue Jul 8 09:00:51 2014 +0200 webdav: fix locking in webdav_ucp::Content::getResourceType() This commit cherry-picks 49a454225e35699d7351faaba3d296e1858c6107 for serf webdav version. Change-Id: Ic5aba4fba8f8a2a521224b08865500dd932e85bf diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index faca565..3829a0c 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: */
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits