[mapserver-commits] r7440 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Sat Mar 8 20:27:26 EST 2008
Author: tomkralidis
Date: 2008-03-08 20:27:26 -0500 (Sat, 08 Mar 2008)
New Revision: 7440
Modified:
trunk/mapserver/mapogcsos.c
Log:
reset pszProcedureURI within loop (#2542)
Modified: trunk/mapserver/mapogcsos.c
===================================================================
--- trunk/mapserver/mapogcsos.c 2008-03-08 01:48:42 UTC (rev 7439)
+++ trunk/mapserver/mapogcsos.c 2008-03-09 01:27:26 UTC (rev 7440)
@@ -765,7 +765,6 @@
pszTmp = msStringConcatenate(pszTmp, pszValueShape);
psNode = xmlNewChild(psObsNode, NULL, BAD_CAST "procedure", NULL);
- //xmlNewNsProp(psNode, xmlNewNs(NULL, BAD_CAST "http://www.w3.org/1999/xlink", BAD_CAST "xlink"), BAD_CAST "href", BAD_CAST pszTmp);
xmlNewNsProp(psNode, psNsXLink, BAD_CAST "href", BAD_CAST pszTmp);
msFree(pszTmp);
pszTmp = NULL;
@@ -783,7 +782,6 @@
pszTmp = msStringConcatenate(pszTmp, (char *)pszValue);
psNode = xmlNewChild(psObsNode, NULL, BAD_CAST "procedure", NULL);
- //xmlNewNsProp(psNode, xmlNewNs(NULL, BAD_CAST "http://www.w3.org/1999/xlink", BAD_CAST "xlink"), BAD_CAST "href", BAD_CAST pszTmp);
xmlNewNsProp(psNode, psNsXLink, BAD_CAST "href", BAD_CAST pszTmp);
msFree(pszTmp);
pszTmp = NULL;
@@ -2430,8 +2428,6 @@
int status;
char *tmpstr = NULL, *pszTmp = NULL, *pszProcedureURI = NULL, *pszProcedureId = NULL;
- pszProcedureURI = strdup("urn:ogc:def:procedure:");
-
if (!sosparams->pszOutputFormat) {
msSetError(MS_SOSERR, "Missing mandatory parameter outputFormat.", "msSOSDescribeSensor()");
return msSOSException(map, "outputformat", "MissingParameterValue");
@@ -2458,6 +2454,7 @@
tokens = msStringSplit(pszId, ' ', &n);
for (k=0; k<n; k++) {
if (tokens[k] && strlen(tokens[k]) > 0) {
+ pszProcedureURI = strdup("urn:ogc:def:procedure:");
pszProcedureURI = msStringConcatenate(pszProcedureURI, tokens[k]);
if (strcasecmp(pszProcedureURI, sosparams->pszProcedure) == 0) {
bFound = 1;
@@ -2518,6 +2515,7 @@
continue;
if (sShape.values[iItemPosition]) {
+ pszProcedureURI = strdup("urn:ogc:def:procedure:");
pszProcedureURI = msStringConcatenate(pszProcedureURI, sShape.values[iItemPosition]);
if (strcasecmp(pszProcedureURI, sosparams->pszProcedure) == 0) {
pszUrl = msOWSLookupMetadata(&(lp->metadata), "S", "describesensor_url");
@@ -2550,7 +2548,7 @@
}
}
}
- msSetError(MS_SOSERR, "procedure %s not found.", "msSOSDescribeSensor()", sosparams->pszProcedure);
+ msSetError(MS_SOSERR, "procedure %s (%s)not found.", "msSOSDescribeSensor()", sosparams->pszProcedure, pszProcedureURI);
return msSOSException(map, "procedure", "InvalidParameterValue");
}
More information about the mapserver-commits
mailing list