[PATCH] Resolves: rhbz#668109 ne_simple_propfind can touch gcrypt as well

Caolán McNamara caolanm at redhat.com
Thu Dec 9 12:32:23 PST 2010


---
 ucb/source/ucp/webdav/NeonPropFindRequest.cxx |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx
index a1ddfb2..17d42cc 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,
-- 
1.7.3.2


--=-921j0zMHMFJFgAdlWhps--



More information about the LibreOffice mailing list