summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-08-26 10:03:21 +0200
committerGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-08-26 12:20:06 +0000
commit72589082945e5a197f3fb4b884f48dd4ae275e5f (patch)
tree3af4078be215dcc9d74c4002655150a389e28f57 /ucb
parent2c2f0eaf6ae6f8b0e235e848b25959301d0941bd (diff)
tdf#101094 (27): Add a mutex guard to OPTIONS neon dispatch calls
This is a sort of follow up to commit: 510da29131e56ba0e1783e505e7131e6f7e0d6b4: "forced to make certain neon api calls thread-safe due to cups rhbz#637738 libgcrypt that's been initialized already by cups to be non-threadsafe is therefore then also non-threadsafe. neon uses libgcrypt. So in the (as this is the usual circumstance) case that cups is initialized before neon, then libgcrypt is not threadsafe even though neon attempt to initialize it as such." Change-Id: I1f868642ac15bf9fa25d3edd46390467d8fce1f5 Reviewed-on: https://gerrit.libreoffice.org/28401 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav-neon/NeonSession.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx
index 8fdab2feaa21..b3f54e6fa4fe 100644
--- a/ucb/source/ucp/webdav-neon/NeonSession.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx
@@ -845,18 +845,19 @@ void NeonSession::OPTIONS( const OUString & inPath,
const DAVRequestEnvironment & rEnv )
throw( std::exception )
{
-
- osl::Guard< osl::Mutex > theGuard( m_aMutex );
SAL_INFO( "ucb.ucp.webdav", "OPTIONS - relative URL <" << inPath << ">" );
rOptions.reset();
Init( rEnv );
+ int theRetVal;
ne_request *req = ne_request_create(m_pHttpSession, "OPTIONS", OUStringToOString(
inPath, RTL_TEXTENCODING_UTF8 ).getStr());
-
- int theRetVal = ne_request_dispatch(req);
+ {
+ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
+ theRetVal = ne_request_dispatch(req);
+ }
//check if http error is in the 200 class (no error)
if (theRetVal == NE_OK && ne_get_status(req)->klass != 2) {