[mapserver-commits] r10373 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Sat Jul 17 10:38:41 EDT 2010


Author: warmerdam
Date: 2010-07-17 14:38:41 +0000 (Sat, 17 Jul 2010)
New Revision: 10373

Modified:
   trunk/mapserver/mapogcfilter.c
   trunk/mapserver/mapogcsld.c
Log:
ensure that errors in sld filter evaluation, like failed proj lookup, are propogated (#3495)

Modified: trunk/mapserver/mapogcfilter.c
===================================================================
--- trunk/mapserver/mapogcfilter.c	2010-07-17 14:04:22 UTC (rev 10372)
+++ trunk/mapserver/mapogcfilter.c	2010-07-17 14:38:41 UTC (rev 10373)
@@ -403,10 +403,15 @@
              && psQueryShape->line[0].numpoints > 0)
     {
         /*reproject shape if epsg was set*/
-        if (psNode->pszSRS &&  map->projection.numargs > 0 &&
-            FTLParseEpsgString(psNode->pszSRS, &sProjTmp))
-           msProjectShape(&sProjTmp, &map->projection, psQueryShape);
+        if (psNode->pszSRS &&  map->projection.numargs > 0 )
+        {
+            if( !FTLParseEpsgString(psNode->pszSRS, &sProjTmp) )
+                return MS_FAILURE;
 
+            status = msProjectShape(&sProjTmp, &map->projection, psQueryShape);
+            if( status != MS_SUCCESS )
+                return status;
+        }
 
         if (bUseGeos)
         {

Modified: trunk/mapserver/mapogcsld.c
===================================================================
--- trunk/mapserver/mapogcsld.c	2010-07-17 14:04:22 UTC (rev 10372)
+++ trunk/mapserver/mapogcsld.c	2010-07-17 14:38:41 UTC (rev 10373)
@@ -148,6 +148,7 @@
     const char *pszTmp = NULL;
     int bFreeTemplate = 0;
     int nLayerStatus = 0;
+    int nStatus = MS_SUCCESS;
     /*const char *pszSLDNotSupported = NULL;*/
     char *tmpfilename = NULL;
     const char *pszFullName = NULL; 
@@ -359,12 +360,11 @@
                         nLayerStatus =  GET_LAYER(map, i)->status;
                         GET_LAYER(map, i)->status = MS_ON;
 
-                        
+                        nStatus = 
+                            FLTApplyFilterToLayer(psNode, map,  
+                                                  GET_LAYER(map, i)->index,
+                                                  !FLTIsSimpleFilter(psNode));
 
-                        FLTApplyFilterToLayer(psNode, map,  
-                                              GET_LAYER(map, i)->index,
-                                              !FLTIsSimpleFilter(psNode));
-
                         GET_LAYER(map, i)->status = nLayerStatus;
                         FLTFreeFilterEncodingNode(psNode);
 
@@ -373,6 +373,9 @@
                             free(GET_LAYER(map, i)->template);
                             GET_LAYER(map, i)->template = NULL;
                         }
+
+                        if( nStatus != MS_SUCCESS )
+                            return nStatus;
                     }
                     else
                     {



More information about the mapserver-commits mailing list