[mapserver-commits] r9046 - branches/branch-5-4/mapserver
svn at osgeo.org
svn at osgeo.org
Thu May 28 13:01:06 EDT 2009
Author: pramsey
Date: 2009-05-28 13:01:05 -0400 (Thu, 28 May 2009)
New Revision: 9046
Modified:
branches/branch-5-4/mapserver/HISTORY.TXT
branches/branch-5-4/mapserver/mappostgis.c
Log:
Fix filter error in multi-clause filters (#2937)
Modified: branches/branch-5-4/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-4/mapserver/HISTORY.TXT 2009-05-28 17:00:45 UTC (rev 9045)
+++ branches/branch-5-4/mapserver/HISTORY.TXT 2009-05-28 17:01:05 UTC (rev 9046)
@@ -14,6 +14,8 @@
Current Version:
----------------
+- Fix filter error in multi-clause filters (#2937)
+
- Fix memory leak in SQL building (#2997)
- Change the dll mapping rules to support the recent MONO versions
Modified: branches/branch-5-4/mapserver/mappostgis.c
===================================================================
--- branches/branch-5-4/mapserver/mappostgis.c 2009-05-28 17:00:45 UTC (rev 9045)
+++ branches/branch-5-4/mapserver/mappostgis.c 2009-05-28 17:01:05 UTC (rev 9046)
@@ -1197,10 +1197,13 @@
/* Populate strFilter, if necessary. */
if ( layer->filter.string ) {
- strFilter = strdup(layer->filter.string);
+ static char *strFilterTemplate = "(%s)";
+ strFilter = (char*)malloc(strlen(strFilterTemplate) + strlen(layer->filter.string));
+ sprintf(strFilter, strFilterTemplate, layer->filter.string);
strFilterLength = strlen(strFilter);
}
+
/* Populate strUid, if necessary. */
if ( uid ) {
static char *strUidTemplate = "\"%s\" = %ld";
More information about the mapserver-commits
mailing list