Commit 96263bc5 authored by Bas Couwenberg's avatar Bas Couwenberg

New upstream version 7.4.2

parent f628922f
......@@ -17,7 +17,7 @@ include(CheckCSourceCompiles)
set (MapServer_VERSION_MAJOR 7)
set (MapServer_VERSION_MINOR 4)
set (MapServer_VERSION_REVISION 1)
set (MapServer_VERSION_REVISION 2)
set (MapServer_VERSION_SUFFIX "")
set(TARGET_VERSION_MAJOR ${MapServer_VERSION_MAJOR})
......
......@@ -12,6 +12,11 @@ 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.4.2 release (2019-9-13)
-------------------------
- No major changes, see detailed changelog for bug fixes
7.4.1 release (2019-7-12)
-------------------------
......
AUTOTEST_OPTS=-strict -q
AUTOTEST_OPTS?=-strict -q
PHP_MAPSCRIPT=build/mapscript/php/php_mapscript.so
PYTHON_MAPSCRIPT_PATH=build/mapscript/python
JAVA_MAPSCRIPT_PATH=build/mapscript/java
......@@ -7,11 +7,11 @@ PERL_MAPSCRIPT_PATH=build/mapscript/perl
BUILDPATH=../../build
FLEX=flex
YACC=yacc
CMAKEFLAGS=-DCMAKE_C_FLAGS="--coverage" -DCMAKE_CXX_FLAGS="--coverage" \
CMAKEFLAGS=-DCMAKE_C_FLAGS="--coverage ${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="--coverage ${CMAKE_CXX_FLAGS}" \
-DCMAKE_SHARED_LINKER_FLAGS="-lgcov" -DWITH_CLIENT_WMS=1 \
-DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 -DWITH_CSHARP=1 -DWITH_PHP=1 -DWITH_PERL=1 \
-DWITH_PYTHON=1 -DWITH_JAVA=1 -DWITH_THREAD_SAFETY=1 -DWITH_FRIBIDI=1 -DWITH_FCGI=0 -DWITH_EXEMPI=1 \
-DCMAKE_BUILD_TYPE=Release -DWITH_RSVG=1 -DWITH_CURL=1 -DWITH_HARFBUZZ=1 -DWITH_POINT_Z_M=1
-DCMAKE_BUILD_TYPE=Release -DWITH_RSVG=1 -DWITH_CURL=1 -DWITH_HARFBUZZ=1 -DWITH_POINT_Z_M=1 ${EXTRA_CMAKEFLAGS}
all: cmakebuild
cmakebuild: lexer parser
......@@ -69,6 +69,9 @@ test: cmakebuild
@$(MAKE) $(MFLAGS) csharp-testcase
@$(MAKE) $(MFLAGS) perl-testcase
asan_compatible_tests: cmakebuild
@$(MAKE) $(MFLAGS) wxs-testcase renderers-testcase misc-testcase gdal-testcase query-testcase
@./print-test-results.sh
lexer: maplexer.c
parser: mapparser.c
......
#!/bin/sh
set -eu
if [ "$BUILD_NAME" != "PHP_7.2_WITH_ASAN" ]; then
# Only run coverage when it is safe to do so (not on pull requests), and only on master branch
echo "$TRAVIS_SECURE_ENV_VARS"
echo "$TRAVIS_BRANCH"
sh -c 'if test "$TRAVIS_SECURE_ENV_VARS" = "true" -a "$TRAVIS_BRANCH" = "master"; then echo "run coverage"; ./run_code_coverage_upload.sh; fi'
coveralls --exclude renderers --exclude mapscript --exclude apache --exclude build/mapscript/mapscriptJAVA_wrap.c --exclude build/mapscript/mapscriptPYTHON_wrap.c --exclude shp2img.c --exclude legend.c --exclude scalebar.c --exclude msencrypt.c --exclude sortshp.c --exclude shptreevis.c --exclude shptree.c --exclude testexpr.c --exclude sym2img.c --exclude testcopy.c --exclude shptreetst.c --exclude tile4ms.c --extension .c --extension .cpp
fi
#!/bin/sh
set -eu
sudo mv /etc/apt/sources.list.d/pgdg* /tmp
dpkg -l | grep postgresql
dpkg -l | grep postgis
sudo apt-get remove postgresql*
sudo add-apt-repository -y ppa:ubuntugis/ppa
sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-testing
sudo apt-get update
sudo apt-get install --allow-unauthenticated protobuf-c-compiler libprotobuf-c0-dev bison flex python-lxml libfribidi-dev cmake librsvg2-dev colordiff libpq-dev libpng12-dev libjpeg-dev libgif-dev libgeos-dev libgd2-xpm-dev libfreetype6-dev libfcgi-dev libcurl4-gnutls-dev libcairo2-dev libgdal1-dev libproj-dev libxml2-dev python-dev libexempi-dev lcov lftp postgis libharfbuzz-dev gdal-bin ccache
sudo apt-get install --allow-unauthenticated libmono-system-drawing4.0-cil mono-mcs
sudo apt-get install --allow-unauthenticated php5-dev || sudo apt-get install --allow-unauthenticated php7-dev
sudo apt-get install --allow-unauthenticated libperl-dev
sudo pip install git+git://github.com/tbonfort/cpp-coveralls.git@extensions
# install swig 3.0.12 (defaults to 2.0.11 on trusty)
wget http://prdownloads.sourceforge.net/swig/swig-3.0.12.tar.gz
export CC="ccache gcc"
export CXX="ccache g++"
tar xf swig-3.0.12.tar.gz
cd swig-3.0.12 && ./configure --prefix=/usr && make -j2 && sudo make install
swig -version
cd ..
cd msautotest
./create_postgis_test_data.sh
python -m SimpleHTTPServer &> /dev/null &
cd ..
touch maplexer.l
touch mapparser.y
#!/bin/sh
set -eu
if [ "$BUILD_NAME" = "PHP_7.2_WITH_ASAN" ]; then
export CC="ccache clang"
export CXX="ccache clang++"
# -DNDEBUG to avoid issues with cairo cleanup
make cmakebuild MFLAGS="-j2" CMAKE_C_FLAGS="-g -fsanitize=address -DNDEBUG" CMAKE_CXX_FLAGS="-g -fsanitize=address -DNDEBUG" EXTRA_CMAKEFLAGS="-DCMAKE_BUILD_TYPE=None -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address"
export AUTOTEST_OPTS="-q -strict -run_under_asan"
# Only run tests that only involve mapserv/shp2img binaries. mspython, etc would require LD_PREOLOAD'ing the asan shared object
make -j4 asan_compatible_tests
else
export CC="ccache gcc"
export CXX="ccache g++"
make cmakebuild MFLAGS="-j2"
make mspython-wheel
make -j4 test
fi
......@@ -204,10 +204,12 @@ int msCopyFontSet(fontSetObj *dst, fontSetObj *src, mapObj *map)
int msCopyExpression(expressionObj *dst, expressionObj *src)
{
if((dst->type == MS_REGEX) && dst->compiled) ms_regfree(&(dst->regex));
dst->compiled = MS_FALSE;
MS_COPYSTRING(dst->string, src->string);
MS_COPYSTELEM(type);
MS_COPYSTELEM(flags);
dst->compiled = MS_FALSE;
return MS_SUCCESS;
}
......
......@@ -6512,6 +6512,7 @@ static int loadMapInternal(mapObj *map)
if(getInteger(&(map->imagequality)) == -1) return MS_FAILURE;
break;
case(IMAGETYPE):
msFree(map->imagetype);
map->imagetype = getToken();
break;
case(INTERLACE):
......@@ -6879,6 +6880,7 @@ int msUpdateMapFromURL(mapObj *map, char *variable, char *string)
/* TODO: should validate or does msPostMapParseOutputFormatSetup() do enough? */
msFree(map->imagetype);
map->imagetype = getToken();
msPostMapParseOutputFormatSetup( map );
break;
......
......@@ -105,10 +105,6 @@ void msGDALCleanup( void )
while( iRepeat-- )
CPLPopErrorHandler();
#if GDAL_RELEASE_DATE > 20021001
GDALDestroyDriverManager();
#endif
msReleaseLock( TLOCK_GDAL );
bGDALInitialized = 0;
......
......@@ -251,8 +251,11 @@ int msAddLabelGroup(mapObj *map, imageObj *image, layerObj* layer, int classinde
msPopulateTextSymbolForLabelAndString(ts,lbl,annotext,layerPtr->scalefactor,image->resolutionfactor, 1);
if(annotext && *annotext && lbl->autominfeaturesize && featuresize > 0) {
if(UNLIKELY(MS_FAILURE == msComputeTextPath(map,ts)))
if(UNLIKELY(MS_FAILURE == msComputeTextPath(map,ts))) {
freeTextSymbol(ts);
free(ts);
return MS_FAILURE;
}
if(featuresize < (ts->textpath->bounds.bbox.maxx - ts->textpath->bounds.bbox.minx)) {
/* feature is too big to be drawn, skip it */
freeTextSymbol(ts);
......
......@@ -2106,7 +2106,7 @@ msINLINELayerInfo;
int msINLINELayerIsOpen(layerObj *layer)
{
if (layer->currentfeature)
if (layer->layerinfo)
return(MS_TRUE);
else
return(MS_FALSE);
......@@ -2227,6 +2227,7 @@ int msINLINELayerNextShape(layerObj *layer, shapeObj *shape)
shape->values = (char **)msSmallRealloc(shape->values, sizeof(char *)*(layer->numitems));
for (i = shape->numvalues; i < layer->numitems; i++)
shape->values[i] = msStrdup("");
shape->numvalues = layer->numitems;
}
break;
......
This diff is collapsed.
%option never-interactive
%{
/*
** READ ME FIRST!
......@@ -45,7 +47,7 @@ int msyystate=MS_TOKENIZE_DEFAULT;
char *msyystring=NULL;
char *msyybasepath=NULL;
char *msyystring_buffer_ptr;
int msyystring_buffer_size = 256;
int msyystring_buffer_size = 0;
int msyystring_size;
char msyystring_begin;
char *msyystring_buffer = NULL;
......@@ -88,10 +90,12 @@ char path[MS_MAXPATHLEN];
%%
if (msyystring_buffer == NULL)
{
msyystring_buffer_size = 256;
msyystring_buffer = (char*) msSmallMalloc(sizeof(char) * msyystring_buffer_size);
}
msyystring_buffer[0] = '\0';
msyystring_buffer_size = 0;
switch(msyystate) {
case(MS_TOKENIZE_DEFAULT):
break;
......
This diff is collapsed.
......@@ -1181,7 +1181,7 @@ int msMSSQL2008LayerGetExtent(layerObj *layer, rectObj *extent)
query = msStringConcatenate(query, "WITH extent(extentcol) AS (SELECT geometry::EnvelopeAggregate(");
query = msStringConcatenate(query, layerinfo->geom_column);
}
query = msStringConcatenate(query, ".MakeValid()) AS extentcol FROM ");
query = msStringConcatenate(query, ") AS extentcol FROM ");
query = msStringConcatenate(query, layerinfo->geom_table);
query = msStringConcatenate(query, ") SELECT extentcol.STPointN(1).STX, extentcol.STPointN(1).STY, extentcol.STPointN(3).STX, extentcol.STPointN(3).STY FROM extent");
}
......@@ -1197,7 +1197,7 @@ int msMSSQL2008LayerGetExtent(layerObj *layer, rectObj *extent)
query = msStringConcatenate(query, "WITH ENVELOPE as (SELECT ");
query = msStringConcatenate(query, layerinfo->geom_column);
}
query = msStringConcatenate(query, ".MakeValid().STEnvelope() as envelope from ");
query = msStringConcatenate(query, ".STEnvelope() as envelope from ");
query = msStringConcatenate(query, layerinfo->geom_table);
query = msStringConcatenate(query, "), CORNERS as (SELECT envelope.STPointN(1) as point from ENVELOPE UNION ALL select envelope.STPointN(3) from ENVELOPE) SELECT MIN(point.STX), MIN(point.STY), MAX(point.STX), MAX(point.STY) FROM CORNERS");
}
......@@ -1502,7 +1502,7 @@ static int prepare_database(layerObj *layer, rectObj rect, char **query_string)
query = msStringConcatenate(query, " AND ");
query = msStringConcatenate(query, layerinfo->geom_column);
query = msStringConcatenate(query, ".MakeValid().STIntersects(");
query = msStringConcatenate(query, ".STIntersects(");
query = msStringConcatenate(query, box3d);
query = msStringConcatenate(query, ") = 1 ");
......@@ -2988,6 +2988,8 @@ int process_node(layerObj* layer, expressionObj *filter)
i++;
continue;
}
if( c == '$' && c_next == 0 && strtmpl[0] == '^' )
break;
if (c == '\\') {
i++;
......
......@@ -61,8 +61,8 @@ static inline void IGUR_sizet(size_t ignored) { (void)ignored; } /* Ignore GCC
/* on the map. Layer name and Named Layer's name parameter are */
/* used to do the match. */
/************************************************************************/
int msSLDApplySLDURL(mapObj *map, char *szURL, int iLayer,
char *pszStyleLayerName, char **ppszLayerNames)
int msSLDApplySLDURL(mapObj *map, const char *szURL, int iLayer,
const char *pszStyleLayerName, char **ppszLayerNames)
{
#ifdef USE_OGR
......@@ -116,6 +116,8 @@ int msSLDApplySLDURL(mapObj *map, char *szURL, int iLayer,
}
}
msFree(pszSLDbuf);
return nStatus;
#else
......@@ -143,7 +145,7 @@ int msSLDApplySLDURL(mapObj *map, char *szURL, int iLayer,
/* they have the same name, copy the classes asscoaited with */
/* the SLD layers onto the map layers. */
/************************************************************************/
int msSLDApplySLD(mapObj *map, char *psSLDXML, int iLayer, char *pszStyleLayerName, char **ppszLayerNames)
int msSLDApplySLD(mapObj *map, const char *psSLDXML, int iLayer, const char *pszStyleLayerName, char **ppszLayerNames)
{
#if defined(USE_WMS_SVR) || defined (USE_WFS_SVR) || defined (USE_WCS_SVR) || defined(USE_SOS_SVR)
......@@ -486,7 +488,7 @@ sld_cleanup:
/* Returns an array of mapserver layers. The pnLayres if */
/* provided will indicate the size of the returned array. */
/************************************************************************/
layerObj *msSLDParseSLD(mapObj *map, char *psSLDXML, int *pnLayers)
layerObj *msSLDParseSLD(mapObj *map, const char *psSLDXML, int *pnLayers)
{
CPLXMLNode *psRoot = NULL;
CPLXMLNode *psSLD, *psNamedLayer, *psChild, *psName;
......@@ -924,6 +926,7 @@ int msSLDParseNamedLayer(CPLXMLNode *psRoot, layerObj *psLayer)
char* pszExpression = msSLDGetCommonExpressionFromFilter(psFilter,
psLayer);
if (pszExpression) {
msFreeExpression(&psLayer->filter);
msInitExpression(&psLayer->filter);
psLayer->filter.string = pszExpression;
psLayer->filter.type = MS_EXPRESSION;
......
......@@ -29,10 +29,10 @@
#include "mapserver.h"
MS_DLL_EXPORT char *msSLDGenerateSLD(mapObj *map, int iLayer, const char *pszVersion);
MS_DLL_EXPORT int msSLDApplySLDURL(mapObj *map, char *szURL, int iLayer,
char *pszStyleLayerName, char **ppszLayerNames);
MS_DLL_EXPORT int msSLDApplySLD(mapObj *map, char *psSLDXML, int iLayer,
char *pszStyleLayerName, char **ppszLayerNames);
MS_DLL_EXPORT int msSLDApplySLDURL(mapObj *map, const char *szURL, int iLayer,
const char *pszStyleLayerName, char **ppszLayerNames);
MS_DLL_EXPORT int msSLDApplySLD(mapObj *map, const char *psSLDXML, int iLayer,
const char *pszStyleLayerName, char **ppszLayerNames);
#ifdef USE_OGR
......@@ -43,7 +43,7 @@ MS_DLL_EXPORT int msSLDApplySLD(mapObj *map, char *psSLDXML, int iLayer,
/* -------------------------------------------------------------------- */
/* prototypes. */
/* -------------------------------------------------------------------- */
layerObj *msSLDParseSLD(mapObj *map, char *psSLDXML, int *pnLayers);
layerObj *msSLDParseSLD(mapObj *map, const char *psSLDXML, int *pnLayers);
int msSLDParseNamedLayer(CPLXMLNode *psRoot, layerObj *layer);
int msSLDParseRule(CPLXMLNode *psRoot, layerObj *psLayer);
int msSLDParseStroke(CPLXMLNode *psStroke, styleObj *psStyle,
......
......@@ -1713,10 +1713,8 @@ int msSOSGetObservation(mapObj *map, sosParamsObj *sosparams, cgiRequestObj *req
xmlNodePtr psObservationNode = NULL, psResultNode=NULL;
const char *pszProcedure = NULL;
const char *pszBlockSep=NULL;
char *pszResult=NULL;
int nDiffrentProc = 0;
SOSProcedureNode *paDiffrentProc = NULL;
char *pszProcedureValue = NULL;
int iItemPosition, status;
shapeObj sShape;
char* pszEscapedStr = NULL;
......@@ -2303,6 +2301,7 @@ this request. Check sos/ows_enable_request settings.", "msSOSGetObservation()",
if (tokens==NULL || n != 4) {
msSetError(MS_SOSERR, "Wrong number of arguments for sos_offering_extent.",
"msSOSGetCapabilities()");
msFree(script_url);
return msSOSException(map, "sos_offering_extent", "InvalidParameterValue");
}
......@@ -2314,6 +2313,7 @@ this request. Check sos/ows_enable_request settings.", "msSOSGetObservation()",
if (map && msProjectionsDiffer(&map->projection, &lp->projection) == MS_TRUE) {
if (msProjectRect(&lp->projection, &map->projection, &envelope) == MS_FAILURE) {
msSetError(MS_SOSERR, "Coordinates transformation failed. Raised in msProjectRect() of file %s line %d", "msSOSGetCapabilities()", __FILE__, __LINE__);
msFree(script_url);
return msSOSException(map, "sos_offering_extent", "InvalidParameterValue");
}
}
......@@ -2352,6 +2352,14 @@ this request. Check sos/ows_enable_request settings.", "msSOSGetObservation()",
msSetError(MS_SOSERR, "resultModel should be om:Measurement or om:Observation", "msSOSGetObservation()");
free(xsi_schemaLocation);
free(schemalocation);
msFree(script_url);
xmlFreeNs(psNsSos);
xmlFreeNs(psNsGml);
xmlFreeNs(psNsOm);
xmlFreeNs(psNsSwe);
xmlFreeNs(psNsXLink);
xmlFreeNs(psNsMs);
xmlFreeDoc(psDoc);
return msSOSException(map, "resultModel", "InvalidParameterValue");
}
......@@ -2391,10 +2399,12 @@ this request. Check sos/ows_enable_request settings.", "msSOSGetObservation()",
else
xmlNodeAddContent(psResultNode, BAD_CAST "\n");
}
pszResult = msSOSReturnMemberResult((GET_LAYER(map, i)), j, NULL);
if (pszResult) {
xmlNodeAddContent(psResultNode, BAD_CAST pszResult);
msFree(pszResult);
{
char* pszResult = msSOSReturnMemberResult((GET_LAYER(map, i)), j, NULL);
if (pszResult) {
xmlNodeAddContent(psResultNode, BAD_CAST pszResult);
msFree(pszResult);
}
}
}
}
......@@ -2404,9 +2414,14 @@ this request. Check sos/ows_enable_request settings.", "msSOSGetObservation()",
else {
for(j=0; j<GET_LAYER(map, i)->resultcache->numresults; j++) {
pszResult = msSOSReturnMemberResult((GET_LAYER(map, i)), j, &pszProcedureValue);
char* pszProcedureValue = NULL;
char* pszResult = msSOSReturnMemberResult((GET_LAYER(map, i)), j, &pszProcedureValue);
if (!pszProcedureValue || !pszResult)
{
msFree(pszProcedureValue);
msFree(pszResult);
continue;
}
for (k=0; k<nDiffrentProc; k++) {
if (strcasecmp(paDiffrentProc[k].pszProcedure, pszProcedureValue) == 0) {
pszBlockSep = msOWSLookupMetadata(&(map->web.metadata), "S",
......@@ -2432,14 +2447,14 @@ this request. Check sos/ows_enable_request settings.", "msSOSGetObservation()",
psObservationNode = msSOSAddMemberNodeObservation(psNsGml, psNsSos, psNsOm, psNsSwe, psNsXLink, psRootNode, map,
(GET_LAYER(map, i)),
pszProcedureValue);
msFree(pszProcedureValue);
paDiffrentProc[nDiffrentProc-1].psResultNode =
xmlNewChild(psObservationNode, NULL, BAD_CAST "result", NULL);
xmlNodeAddContent(paDiffrentProc[nDiffrentProc-1].psResultNode, BAD_CAST pszResult);
msFree(pszResult);
}
msFree(pszProcedureValue);
msFree(pszResult);
}
if (paDiffrentProc) {
for (k=0; k<nDiffrentProc; k++)
......
......@@ -76,7 +76,7 @@ typedef struct ms_ogr_file_info_t {
char *pszRowId;
int bIsOKForSQLCompose;
bool bHasSpatialIndex; // used only for spatialite for now
char* pszTablePrefix; // prefix to qualify field names. used only for spatialite for now when a join is done for spatial filtering.
char* pszTablePrefix; // prefix to qualify field names. used only for spatialite & gpkg for now when a join is done for spatial filtering.
int bPaging;
......@@ -1386,6 +1386,7 @@ msOGRFileOpen(layerObj *layer, const char *connection )
if( have_gpkg_spatialite )
{
psInfo->pszMainTableName = msStrdup( OGR_L_GetName(hLayer) );
psInfo->pszTablePrefix = msStrdup( psInfo->pszMainTableName );
psInfo->pszSpatialFilterTableName = msStrdup( OGR_L_GetName(hLayer) );
psInfo->pszSpatialFilterGeometryColumn = msStrdup( OGR_L_GetGeometryColumn(hLayer) );
psInfo->dialect = "GPKG";
......@@ -5522,7 +5523,6 @@ void msOGRCleanup( void )
ACQUIRE_OGR_LOCK;
if( bOGRDriversRegistered == MS_TRUE ) {
CPLPopErrorHandler();
OGRCleanupAll();
bOGRDriversRegistered = MS_FALSE;
}
RELEASE_OGR_LOCK;
......
......@@ -760,6 +760,8 @@ int msOGRWriteFromQuery( mapObj *map, outputFormatObj *format, int sendheaders )
"STORAGE=%s value not supported.",
"msOGRWriteFromQuery()",
storage );
CSLDestroy(layer_options);
CSLDestroy(ds_options);
return MS_FAILURE;
}
......@@ -789,6 +791,9 @@ int msOGRWriteFromQuery( mapObj *map, outputFormatObj *format, int sendheaders )
"Attempt to create directory '%s' failed.",
"msOGRWriteFromQuery()",
dir_to_create );
msFree(request_dir);
CSLDestroy(layer_options);
CSLDestroy(ds_options);
return MS_FAILURE;
}
}
......@@ -816,6 +821,9 @@ int msOGRWriteFromQuery( mapObj *map, outputFormatObj *format, int sendheaders )
"Invalid value for FILENAME option. "
"It must not contain any directory information.",
"msOGRWriteFromQuery()" );
msFree(request_dir);
CSLDestroy(layer_options);
CSLDestroy(ds_options);
return MS_FAILURE;
}
......@@ -876,6 +884,7 @@ int msOGRWriteFromQuery( mapObj *map, outputFormatObj *format, int sendheaders )
"msOGRWriteFromQuery()",
datasource_name,
format->driver+4 );
CSLDestroy(layer_options);
return MS_FAILURE;
}
......@@ -983,6 +992,7 @@ int msOGRWriteFromQuery( mapObj *map, outputFormatObj *format, int sendheaders )
"msOGRWriteFromQuery()",
layer->name,
format->driver+4 );
CSLDestroy(layer_options);
return MS_FAILURE;
}
......@@ -1051,6 +1061,7 @@ int msOGRWriteFromQuery( mapObj *map, outputFormatObj *format, int sendheaders )
OGR_DS_Destroy( hDS );
msOGRCleanupDS( datasource_name );
msGMLFreeItems(item_list);
CSLDestroy(layer_options);
return MS_FAILURE;
}
......@@ -1071,6 +1082,7 @@ int msOGRWriteFromQuery( mapObj *map, outputFormatObj *format, int sendheaders )
OGR_DS_Destroy( hDS );
msOGRCleanupDS( datasource_name );
msGMLFreeItems(item_list);
CSLDestroy(layer_options);
return status;
}
}
......@@ -1101,6 +1113,7 @@ int msOGRWriteFromQuery( mapObj *map, outputFormatObj *format, int sendheaders )
msOGRCleanupDS( datasource_name );
msGMLFreeItems(item_list);
msFreeShape(&resultshape);
CSLDestroy(layer_options);
return status;
}
}
......@@ -1152,6 +1165,7 @@ int msOGRWriteFromQuery( mapObj *map, outputFormatObj *format, int sendheaders )
msOGRCleanupDS( datasource_name );
msGMLFreeItems(item_list);
msFreeShape(&resultshape);
CSLDestroy(layer_options);
return status;
}
}
......@@ -1165,6 +1179,8 @@ int msOGRWriteFromQuery( mapObj *map, outputFormatObj *format, int sendheaders )
/* -------------------------------------------------------------------- */
OGR_DS_Destroy( hDS );
CSLDestroy( layer_options );
/* -------------------------------------------------------------------- */
/* Get list of resulting files. */
/* -------------------------------------------------------------------- */
......@@ -1366,7 +1382,6 @@ int msOGRWriteFromQuery( mapObj *map, outputFormatObj *format, int sendheaders )
msOGRCleanupDS( datasource_name );
CSLDestroy( layer_options );
CSLDestroy( file_list );
return MS_SUCCESS;
......
......@@ -2002,6 +2002,7 @@ int msOWSPrintEncodeMetadataList(FILE *stream, hashTableObj *metadata,
{
const char *value;
char *encoded;
size_t default_value_len = 0;
value = msOWSLookupMetadata(metadata, namespaces, name);
......@@ -2009,6 +2010,8 @@ int msOWSPrintEncodeMetadataList(FILE *stream, hashTableObj *metadata,
value = default_value;
default_value = NULL;
}
if( default_value )
default_value_len = strlen(default_value);
if(value != NULL) {
char **keywords;
......@@ -2020,8 +2023,9 @@ int msOWSPrintEncodeMetadataList(FILE *stream, hashTableObj *metadata,
if(startTag) msIO_fprintf(stream, "%s", startTag);
for(kw=0; kw<numkeywords; kw++) {
if (default_value != NULL
&& default_value_len > 8
&& strncasecmp(keywords[kw],default_value,strlen(keywords[kw])) == 0
&& strncasecmp("_exclude",default_value+strlen(default_value)-8,8) == 0)
&& strncasecmp("_exclude",default_value+default_value_len-8,8) == 0)
continue;
encoded = msEncodeHTMLEntities(keywords[kw]);
......
This diff is collapsed.
/* A Bison parser, made by GNU Bison 2.3. */
/* A Bison parser, made by GNU Bison 3.0.4. */
/* Skeleton interface for Bison's Yacc-like parsers in C
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -16,9 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
......@@ -33,58 +30,67 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* Tokens. */
#ifndef YY_YY_HOME_EVEN_MAPSERVER_MAPSERVER_MAPPARSER_H_INCLUDED
# define YY_YY_HOME_EVEN_MAPSERVER_MAPSERVER_MAPPARSER_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif
/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
BOOLEAN = 258,
NUMBER = 259,
STRING = 260,
TIME = 261,
SHAPE = 262,
OR = 263,
AND = 264,
NOT = 265,
IRE = 266,
IEQ = 267,
IN = 268,
GE = 269,
LE = 270,
GT = 271,
LT = 272,
NE = 273,
EQ = 274,
RE = 275,
DWITHIN = 276,
BEYOND = 277,
EQUALS = 278,
CONTAINS = 279,
WITHIN = 280,
CROSSES = 281,
OVERLAPS = 282,
TOUCHES = 283,
DISJOINT = 284,
INTERSECTS = 285,
ROUND = 286,
COMMIFY = 287,
LENGTH = 288,
AREA = 289,
FIRSTCAP = 290,
INITCAP = 291,
LOWER = 292,
UPPER = 293,
TOSTRING = 294,
JAVASCRIPT = 295,
SMOOTHSIA = 296,
GENERALIZE = 297,
SIMPLIFYPT = 298,
SIMPLIFY = 299,
DIFFERENCE = 300,
YYBUFFER = 301,
NEG = 302
};
enum yytokentype
{
BOOLEAN = 258,
NUMBER = 259,
STRING = 260,
TIME = 261,
SHAPE = 262,
OR = 263,
AND = 264,
NOT = 265,
RE = 266,
EQ = 267,
NE = 268,
LT = 269,
GT = 270,
LE = 271,
GE = 272,
IN = 273,
IEQ = 274,
IRE = 275,
INTERSECTS = 276,
DISJOINT = 277,
TOUCHES = 278,
OVERLAPS = 279,
CROSSES = 280,
WITHIN = 281,
CONTAINS = 282,
EQUALS = 283,
BEYOND = 284,
DWITHIN = 285,
AREA = 286,
LENGTH = 287,
COMMIFY = 288,
ROUND = 289,
UPPER = 290,
LOWER = 291,
INITCAP = 292,
FIRSTCAP = 293,
TOSTRING = 294,
YYBUFFER = 295,
DIFFERENCE = 296,
SIMPLIFY = 297,
SIMPLIFYPT = 298,
GENERALIZE = 299,
SMOOTHSIA = 300,
JAVASCRIPT = 301,
NEG = 302
};
#endif
/* Tokens. */
#define BOOLEAN 258
......@@ -95,64 +101,67 @@
#define OR 263
#define AND 264
#define NOT 265
#define IRE 266
#define IEQ 267
#define IN 268
#define GE 269
#define LE 270
#define GT 271
#define LT 272
#define NE 273
#define EQ 274
#define RE 275
#define DWITHIN 276
#define BEYOND 277
#define EQUALS 278
#define CONTAINS 279
#define WITHIN 280
#define CROSSES 281
#define OVERLAPS 282
#define TOUCHES 283
#define DISJOINT 284
#define INTERSECTS 285
#define ROUND 286
#define COMMIFY 287
#define LENGTH 288
#define AREA 289
#define FIRSTCAP 290
#define INITCAP 291
#define LOWER 292
#define UPPER 293
#define RE 266
#define EQ 267
#define NE 268
#define LT 269
#define GT 270
#define LE 271
#define GE 272
#define IN 273
#define IEQ 274
#define IRE 275
#define INTERSECTS 276
#define DISJOINT 277
#define TOUCHES 278
</