From 85c2c9a5a2869cfbf6b4a65bf7acddead85b2336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 9 Dec 2010 20:32:23 +0000 Subject: [PATCH] Resolves: rhbz#668109 ne_simple_propfind can touch gcrypt as well --- ucb/source/ucp/webdav/NeonPropFindRequest.cxx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx index 807a255efcc3..ff2298fe5f6a 100644 --- a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx +++ b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx @@ -260,6 +260,8 @@ extern "C" void NPFR_propnames_results( void* userdata, theResources->push_back( theResource ); } +extern osl::Mutex aGlobalNeonMutex; + // ------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------- @@ -287,12 +289,15 @@ NeonPropFindRequest::NeonPropFindRequest( HttpSession* inSession, thePropNames[ theIndex ].nspace = NULL; thePropNames[ theIndex ].name = NULL; - nError = ne_simple_propfind( inSession, - inPath, - inDepth, - thePropNames, - NPFR_propfind_results, - &ioResources ); + { + osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex ); + nError = ne_simple_propfind( inSession, + inPath, + inDepth, + thePropNames, + NPFR_propfind_results, + &ioResources ); + } for ( theIndex = 0; theIndex < thePropCount; theIndex ++ ) free( (void *)thePropNames[ theIndex ].name ); @@ -302,6 +307,7 @@ NeonPropFindRequest::NeonPropFindRequest( HttpSession* inSession, else { // ALLPROP + osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex ); nError = ne_simple_propfind( inSession, inPath, inDepth,