[mapserver-commits] r10048 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Tue Apr 6 12:06:23 EDT 2010


Author: warmerdam
Date: 2010-04-06 12:06:21 -0400 (Tue, 06 Apr 2010)
New Revision: 10048

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapthread.c
Log:
avoid race condition on core_lock (#3396)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2010-04-06 15:56:28 UTC (rev 10047)
+++ trunk/mapserver/HISTORY.TXT	2010-04-06 16:06:21 UTC (rev 10048)
@@ -14,6 +14,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- Avoid race condition on core_lock on win32 mutex init (#3396)
+
 - Avoid use of inline keyword for C code (#3327)
 
 - Support WFS parsing through libxml2 (#3364)

Modified: trunk/mapserver/mapthread.c
===================================================================
--- trunk/mapserver/mapthread.c	2010-04-06 15:56:28 UTC (rev 10047)
+++ trunk/mapserver/mapthread.c	2010-04-06 16:06:21 UTC (rev 10048)
@@ -259,8 +259,8 @@
 
     if( core_lock == NULL )
         core_lock = CreateMutex( NULL, TRUE, NULL );
-    
-    WaitForSingleObject( core_lock, INFINITE );
+    else
+        WaitForSingleObject( core_lock, INFINITE );
 
     for( ; mutexes_initialized < TLOCK_STATIC_MAX; mutexes_initialized++ )
         mutex_locks[mutexes_initialized] = CreateMutex( NULL, FALSE, NULL );



More information about the mapserver-commits mailing list