[mapserver-commits] r7610 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed May 21 15:19:28 EDT 2008


Author: dmorissette
Date: 2008-05-21 15:19:27 -0400 (Wed, 21 May 2008)
New Revision: 7610

Modified:
   trunk/mapserver/mapows.c
   trunk/mapserver/mapwms.c
Log:
Accept layers with no name in WMS GetCapabilities (#2562)


Modified: trunk/mapserver/mapows.c
===================================================================
--- trunk/mapserver/mapows.c	2008-05-21 15:43:03 UTC (rev 7609)
+++ trunk/mapserver/mapows.c	2008-05-21 19:19:27 UTC (rev 7610)
@@ -174,10 +174,7 @@
       {
           if (GET_LAYER(map, i)->name == NULL || GET_LAYER(map, j)->name == NULL)
           {
-              msSetError(MS_MISCERR, 
-                         "At least one layer is missing a name in map file.", 
-                         "msOWSMakeAllLayersUnique()");
-              return MS_FAILURE;
+              continue;
           }
           if (strcasecmp(GET_LAYER(map, i)->name, GET_LAYER(map, j)->name) == 0 &&
               msRenameLayer((GET_LAYER(map, j)), ++count) != MS_SUCCESS)

Modified: trunk/mapserver/mapwms.c
===================================================================
--- trunk/mapserver/mapwms.c	2008-05-21 15:43:03 UTC (rev 7609)
+++ trunk/mapserver/mapwms.c	2008-05-21 19:19:27 UTC (rev 7610)
@@ -1134,7 +1134,7 @@
      msIO_fprintf(stdout, "<!-- WARNING: The layer name '%s' might contain spaces or "
                         "invalid characters or may start with a number. This could lead to potential problems. -->\n", 
                   lp->name);
-   msOWSPrintEncodeParam(stdout, "LAYER.NAME", lp->name, OWS_WARN,
+   msOWSPrintEncodeParam(stdout, "LAYER.NAME", lp->name, OWS_NOERR,
                          "        <Name>%s</Name>\n", NULL);
 
    /* the majority of this section is dependent on appropriately named metadata in the LAYER object */



More information about the mapserver-commits mailing list