[Git][debian-gis-team/mapserver][upstream] New upstream version 7.6.0~rc4

Bas Couwenberg gitlab at salsa.debian.org
Tue May 5 05:00:18 BST 2020



Bas Couwenberg pushed to branch upstream at Debian GIS Project / mapserver


Commits:
05ea5a7b by Bas Couwenberg at 2020-05-05T05:45:09+02:00
New upstream version 7.6.0~rc4
- - - - -


4 changed files:

- CMakeLists.txt
- HISTORY.TXT
- mappostgis.c
- mapwmslayer.c


Changes:

=====================================
CMakeLists.txt
=====================================
@@ -18,7 +18,7 @@ include(CheckCSourceCompiles)
 set (MapServer_VERSION_MAJOR 7)
 set (MapServer_VERSION_MINOR 6)
 set (MapServer_VERSION_REVISION 0)
-set (MapServer_VERSION_SUFFIX "-rc3")
+set (MapServer_VERSION_SUFFIX "-rc4")
 
 # Set C++ version
 # Make CMAKE_CXX_STANDARD available as cache option overridable by user


=====================================
HISTORY.TXT
=====================================
@@ -12,6 +12,13 @@ For a complete change history, please see the Git log comments.  For more
 details about recent point releases, please see the online changelog at:
 http://mapserver.org/development/changelog/
 
+7.6.0-rc4 release (2020-05-04)
+------------------------------
+
+- Fix case insensitive 'using unique' for PostGIS connections (#6062)
+
+- Add handling essential WMS layers (#6061)
+
 7.6.0-rc3 release (2020-04-24)
 ------------------------------
 


=====================================
mappostgis.c
=====================================
@@ -1344,9 +1344,9 @@ int msPostGISParseData(layerObj *layer)
   if ( pos_use_2nd )
   {
     for ( tmp = pos_use_2nd + 5; *tmp == ' '; tmp++ );
-    if ( strncmp ( tmp, "unique ", 7 ) == 0 )
+    if ( strncasecmp ( tmp, "unique ", 7 ) == 0 )
       for ( pos_uid = tmp + 7; *pos_uid == ' '; pos_uid++ );
-    if ( strncmp ( tmp, "srid=", 5 ) == 0 ) pos_srid = tmp + 5;
+    if ( strncasecmp ( tmp, "srid=", 5 ) == 0 ) pos_srid = tmp + 5;
   };
 
   /*
@@ -1355,7 +1355,7 @@ int msPostGISParseData(layerObj *layer)
   if ( pos_use_1st )
   {
     for ( tmp = pos_use_1st + 5; *tmp == ' '; tmp++ );
-    if ( strncmp ( tmp, "unique ", 7 ) == 0 )
+    if ( strncasecmp ( tmp, "unique ", 7 ) == 0 )
     {
       if ( pos_uid )
       {
@@ -1365,7 +1365,7 @@ int msPostGISParseData(layerObj *layer)
       };
       for ( pos_uid = tmp + 7; *pos_uid == ' '; pos_uid++ );
     };
-    if ( strncmp ( tmp, "srid=", 5 ) == 0 )
+    if ( strncasecmp ( tmp, "srid=", 5 ) == 0 )
     {
       if ( pos_srid )
       {


=====================================
mapwmslayer.c
=====================================
@@ -1278,6 +1278,18 @@ int msDrawWMSLayerLow(int nLayerId, httpRequestObj *pasReqInfo,
   int currentconnectiontype;
   int numclasses;
   char *mem_filename = NULL;
+  const char *pszTmp;
+  int bIsEssential;
+
+  /* ------------------------------------------------------------------
+   * Sometimes a requested layer is essential for the map, so if the
+   * request fails or an error is delivered, the map has not to be drawn
+   * ------------------------------------------------------------------ */
+  bIsEssential = MS_FALSE;
+  if ((pszTmp = msOWSLookupMetadata(&(lp->metadata),
+                                    "MO", "essential")) != NULL) {
+    bIsEssential = atoi(pszTmp);
+  }
 
   /* ------------------------------------------------------------------
    * Find the request info for this layer in the array, based on nLayerId
@@ -1297,8 +1309,9 @@ int msDrawWMSLayerLow(int nLayerId, httpRequestObj *pasReqInfo,
   if ( !MS_HTTP_SUCCESS( pasReqInfo[iReq].nStatus ) ) {
     /* ====================================================================
           Failed downloading layer... we log an error but we still return
-          SUCCESS here so that the layer is only skipped intead of aborting
+          SUCCESS here so that the layer is only skipped instead of aborting
           the whole draw map.
+          If the layer is essential the map is not to be drawn.
      ==================================================================== */
     msSetError(MS_WMSERR,
                "WMS GetMap request failed for layer '%s' (Status %d: %s).",
@@ -1306,14 +1319,18 @@ int msDrawWMSLayerLow(int nLayerId, httpRequestObj *pasReqInfo,
                (lp->name?lp->name:"(null)"),
                pasReqInfo[iReq].nStatus, pasReqInfo[iReq].pszErrBuf );
 
-    return MS_SUCCESS;
+    if (!bIsEssential)
+      return MS_SUCCESS;
+    else
+      return MS_FAILURE;
   }
 
   /* ------------------------------------------------------------------
    * Check the Content-Type of the response to see if we got an exception,
    * if yes then try to parse it and pass the info to msSetError().
    * We log an error but we still return SUCCESS here so that the layer
-   * is only skipped intead of aborting the whole draw map.
+   * is only skipped instead of aborting the whole draw map.
+   * If the layer is essential the map is not to be drawn.
    * ------------------------------------------------------------------ */
   if (pasReqInfo[iReq].pszContentType &&
       (strcmp(pasReqInfo[iReq].pszContentType, "text/xml") == 0 ||
@@ -1358,7 +1375,10 @@ int msDrawWMSLayerLow(int nLayerId, httpRequestObj *pasReqInfo,
                "msDrawWMSLayerLow()",
                (lp->name?lp->name:"(null)"), szBuf );
 
-    return MS_SUCCESS;
+    if (!bIsEssential)
+      return MS_SUCCESS;
+    else
+      return MS_FAILURE;
   }
 
   /* ------------------------------------------------------------------



View it on GitLab: https://salsa.debian.org/debian-gis-team/mapserver/-/commit/05ea5a7b88e7e4a38d5fafdfc3fe8b81994f78ae

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapserver/-/commit/05ea5a7b88e7e4a38d5fafdfc3fe8b81994f78ae
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20200505/de3b5d2a/attachment-0001.html>


More information about the Pkg-grass-devel mailing list