ucb/source/ucp/webdav-curl/SerfLockStore.cxx |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit abc32f115ffd8df20ed122f6a769027b68da13f2
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Thu Feb 3 09:16:10 2022 -0400
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Tue Feb 8 11:26:35 2022 +0100

    ucb: webdav: fix "__lll_lock_wait () "
    
    0  0x00007ffff74bc29c in __lll_lock_wait () at 
../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:103
    1  0x00007ffff74b5714 in __GI___pthread_mutex_lock (mutex=0x7fffbfad04c0 
<(anonymous namespace)::g_Init>)
        at ../nptl/pthread_mutex_lock.c:80
    2  0x00007fffbf996ed2 in __gthread_mutex_lock(__gthread_mutex_t*) 
(__mutex=0x7fffbfad04c0 <(anonymous namespace)::g_Init>)
        at /usr/include/x86_64-linux-gnu/c++/8/bits/gthr-default.h:748
    3  0x00007fffbf9b0b56 in std::mutex::lock() (this=0x7fffbfad04c0 
<(anonymous namespace)::g_Init>)
        at /usr/include/c++/8/bits/std_mutex.h:103
    4  0x00007fffbf9b69dd in std::unique_lock<std::mutex>::lock() 
(this=0x7fffffff97e0)
        at /usr/include/c++/8/bits/std_mutex.h:267
    5  0x00007fffbf9e0878 in 
std::unique_lock<std::mutex>::unique_lock(std::mutex&) (this=0x7fffffff97e0, 
__m=...)
        at /usr/include/c++/8/bits/std_mutex.h:197
    6  0x00007fffbf9f01e7 in http_dav_ucp::SerfLockStore::startTicker() 
(this=0x7fffbfad04c0 <(anonymous namespace)::g_Init>)  at 
/home/hcastro/projects/online/lib/core/sid/ucb/source/ucp/webdav-curl/SerfLockStore.cxx:107
    7  0x00007fffbf9f0728 in http_dav_ucp::SerfLockStore::addLock(rtl::OUString 
const&, com::sun::star::ucb::Lock const&, rtl::OUString const&, 
rtl::Reference<http_dav_ucp::CurlSession> const&, int)
    
    Change-Id: I01d3c1f67281ceab38e0452ba9cc714d4aacdbcb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129447
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/ucb/source/ucp/webdav-curl/SerfLockStore.cxx 
b/ucb/source/ucp/webdav-curl/SerfLockStore.cxx
index d39df9a49e58..000edaaa15ee 100644
--- a/ucb/source/ucp/webdav-curl/SerfLockStore.cxx
+++ b/ucb/source/ucp/webdav-curl/SerfLockStore.cxx
@@ -176,11 +176,12 @@ void SerfLockStore::addLock( const OUString& rURI,
                              sal_Int32 nLastChanceToSendRefreshRequest )
 {
     assert(rURI.startsWith("http://";) || rURI.startsWith("https://";));
+    {
+        std::unique_lock aGuard( m_aMutex );
 
-    std::unique_lock aGuard( m_aMutex );
-
-    m_aLockInfoMap[ rURI ]
-        = LockInfo(sToken, rLock, xSession, nLastChanceToSendRefreshRequest);
+        m_aLockInfoMap[ rURI ]
+            = LockInfo(sToken, rLock, xSession, 
nLastChanceToSendRefreshRequest);
+    }
 
     startTicker();
 }

Reply via email to