1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
Description: Fix for buffer_copy when loading config from mapfile.
Author: Pirmin Kalberer <pi_deb@sourcepole.ch>
Origin: https://github.com/mapserver/tinyows/issues/58#issue-11806824
Bug: https://github.com/mapserver/tinyows/issues/58
--- a/src/mapfile/mapfile.l
+++ b/src/mapfile/mapfile.l
@@ -539,12 +539,14 @@ static void end_layer()
buffer_add_str(map_l->storage->schema, "public");
if (!map_is_dump) map_l->retrievable=map_l->writable = false;
+ map_l->name_prefix = buffer_init();
buffer_copy(map_l->name_prefix, map_l->name);
if (map_l->ns_prefix->use) {
buffer_add_head(map_l->name_prefix, ':');
buffer_add_head_str(map_l->name_prefix, map_l->ns_prefix->buf);
}
+ map_l->name_no_uri = buffer_init();
buffer_copy(map_l->name_no_uri, map_l->name);
if (map_l->ns_uri->use) {
buffer_add_head(map_l->name, ':');
--- a/src/mapfile/mapfile.c
+++ b/src/mapfile/mapfile.c
@@ -1588,12 +1588,14 @@ static void end_layer()
buffer_add_str(map_l->storage->schema, "public");
if (!map_is_dump) map_l->retrievable=map_l->writable = false;
+ map_l->name_prefix = buffer_init();
buffer_copy(map_l->name_prefix, map_l->name);
if (map_l->ns_prefix->use) {
buffer_add_head(map_l->name_prefix, ':');
buffer_add_head_str(map_l->name_prefix, map_l->ns_prefix->buf);
}
+ map_l->name_no_uri = buffer_init();
buffer_copy(map_l->name_no_uri, map_l->name);
if (map_l->ns_uri->use) {
buffer_add_head(map_l->name, ':');
|