[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - ucb/source

Matúš Kukan matus.kukan at collabora.com
Tue Jul 8 06:00:49 PDT 2014


 ucb/source/ucp/webdav/webdavcontent.cxx |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 27fec073a8e78aad1979160bc4c8d9a4aafc3e82
Author: Matúš Kukan <matus.kukan at 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
    (cherry picked from commit 9da4e46957bd1a69c4339eeb1d107546c400e6e3)
    Reviewed-on: https://gerrit.libreoffice.org/10129
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index cd416cc..3d720b7 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -3394,7 +3394,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: */


More information about the Libreoffice-commits mailing list