From 205cad460ba5c519e4c6411a3b0c2d33cacba534 Mon Sep 17 00:00:00 2001 From: Sergey Safarov Date: Sun, 13 Dec 2020 18:40:45 +0300 Subject: [PATCH] lost: removed not used namespace fix #2584 --- src/modules/lost/utilities.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/lost/utilities.c b/src/modules/lost/utilities.c index ab717fce186..4e3450b21b2 100644 --- a/src/modules/lost/utilities.c +++ b/src/modules/lost/utilities.c @@ -955,12 +955,15 @@ char *lost_find_service_request(p_loc_t loc, int *lgth) /* set properties */ xmlNewProp(ptrFindService, BAD_CAST "xmlns", BAD_CAST "urn:ietf:params:xml:ns:lost1"); - xmlNewProp(ptrFindService, BAD_CAST "xmlns:p2", - BAD_CAST "http://www.opengis.net/gml"); xmlNewProp(ptrFindService, BAD_CAST "serviceBoundary", (loc->boundary == 1) ? BAD_CAST "value" : BAD_CAST "reference"); xmlNewProp(ptrFindService, BAD_CAST "recursive", (loc->recursive == 1) ? BAD_CAST "true" : BAD_CAST "false"); + if(loc->xpath == NULL) { + xmlNewProp(ptrFindService, BAD_CAST "xmlns:p2", + BAD_CAST "http://www.opengis.net/gml"); + } + /* location - element */ ptrLocation = xmlNewChild(ptrFindService, NULL, BAD_CAST "location", NULL); xmlNewProp(ptrLocation, BAD_CAST "id", BAD_CAST loc->identity);