[mapserver-commits] r9835 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Sun Feb 21 09:44:33 EST 2010


Author: jimk
Date: 2010-02-21 09:44:32 -0500 (Sun, 21 Feb 2010)
New Revision: 9835

Modified:
   trunk/mapserver/mapwfslayer.c
Log:
Fix race condition in WFS layers. #3137



Modified: trunk/mapserver/mapwfslayer.c
===================================================================
--- trunk/mapserver/mapwfslayer.c	2010-02-21 14:21:24 UTC (rev 9834)
+++ trunk/mapserver/mapwfslayer.c	2010-02-21 14:44:32 UTC (rev 9835)
@@ -646,23 +646,12 @@
     }
 
     /* We'll store the remote server's response to a tmp file. */
-    if (bPostRequest)
-    {
-        char *pszPostTmpName = NULL;
-        pszPostTmpName = (char *)malloc(sizeof(char)*(strlen(pszURL)+128));
-        sprintf(pszPostTmpName,"%s%ld%d",
-                pszURL, (long)time(NULL), (int)getpid());
-        pszHashFileName = msHashString(pszPostTmpName);
-        free(pszPostTmpName);
-    }
-    else
-      pszHashFileName = msHashString(pszURL);
-    pszURL = NULL;
-    
-    pasReqInfo[(*numRequests)].pszOutputFile =  
-        msOWSBuildURLFilename(map->web.imagepath, 
-                              pszHashFileName,".tmp.gml");
-    free(pszHashFileName);
+    pasReqInfo[(*numRequests)].pszOutputFile = msTmpFile(map->mappath, 
+                                                 map->web.imagepath, ".tmp.gml"); 
+	/* TODO: Implement Caching of GML responses. There was an older caching 
+     * method, but it suffered from a race condition. See #3137.
+     */ 
+
     pasReqInfo[(*numRequests)].pszHTTPCookieData = pszHTTPCookieData;
     pszHTTPCookieData = NULL;
     pasReqInfo[(*numRequests)].nStatus = 0;



More information about the mapserver-commits mailing list