[mapserver-commits] r8022 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Tue Nov 18 20:27:37 EST 2008


Author: warmerdam
Date: 2008-11-18 20:27:37 -0500 (Tue, 18 Nov 2008)
New Revision: 8022

Modified:
   trunk/mapserver/mapproject.c
Log:
avoid race conditions with msSetPROJ_LIB() (#2811)

Modified: trunk/mapserver/mapproject.c
===================================================================
--- trunk/mapserver/mapproject.c	2008-11-18 20:27:32 UTC (rev 8021)
+++ trunk/mapserver/mapproject.c	2008-11-19 01:27:37 UTC (rev 8022)
@@ -877,6 +877,8 @@
 #ifdef USE_PROJ
     static int finder_installed = 0;
 
+    msAcquireLock( TLOCK_PROJ );
+
     if( finder_installed == 0 && proj_lib != NULL)
     {
         finder_installed = 1;
@@ -899,6 +901,8 @@
 
     if( proj_lib != NULL )
         ms_proj_lib = strdup( proj_lib );
+    
+    msReleaseLock( TLOCK_PROJ );
 #endif
 }
 



More information about the mapserver-commits mailing list