Skip to content
Permalink
Browse files

Fix bug in configuration parsing

  • Loading branch information
jbo-ads committed Nov 25, 2019
1 parent 6c7fafa commit 02ec060f103ea4803783cb1cdad86dacb17f8f03
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/configuration_xml.c
@@ -158,10 +158,11 @@ void parseDimensions(mapcache_context *ctx, ezxml_t node, mapcache_tileset *tile
}
}

tileset->assembly_threaded_fetching_maxzoom = -1;
dimension_node = ezxml_child(node,"assembly_threaded_fetching");
if (dimension_node) {
if (dimension_node && dimension_node->txt) {
if (!strcmp(dimension_node->txt,"false")) {
if (!strcmp(dimension_node->txt,"true")) {
int maxzoom = INT_MAX;
char * smaxzoom = (char*)ezxml_attr(dimension_node,"maxzoom");;
if (smaxzoom && *smaxzoom) {
@@ -174,13 +175,11 @@ void parseDimensions(mapcache_context *ctx, ezxml_t node, mapcache_tileset *tile
}
}
tileset->assembly_threaded_fetching_maxzoom = maxzoom;
} else if (strcmp(dimension_node->txt,"true")) {
} else if (strcmp(dimension_node->txt,"false")) {
ctx->set_error(ctx,400,"failed to parse <assembly_threaded_fetching>"
" (%s), expecting \"true\" or \"false\"",dimension_node->txt);
return;
}
} else {
tileset->assembly_threaded_fetching_maxzoom = -1;
}
}

0 comments on commit 02ec060

Please sign in to comment.
You can’t perform that action at this time.