mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 18:05:42 +02:00
Fix where I was closing the prefilter pipe in the wrong thread
This commit is contained in:
@@ -1367,6 +1367,10 @@ void *run_prefilter(void *v) {
|
|||||||
layer_to_geojson(rpa->prefilter_fp, tmp_layer, 0, 0, 0, false, true);
|
layer_to_geojson(rpa->prefilter_fp, tmp_layer, 0, 0, 0, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fclose(rpa->prefilter_fp) != 0) {
|
||||||
|
perror("fclose output to prefilter");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1582,10 +1586,6 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (prefilter != NULL) {
|
if (prefilter != NULL) {
|
||||||
if (fclose(prefilter_fp) != 0) {
|
|
||||||
perror("fclose output to prefilter");
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
if (close(prefilter_read) != 0) {
|
if (close(prefilter_read) != 0) {
|
||||||
perror("close output from prefilter");
|
perror("close output from prefilter");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|||||||
+2
-2
@@ -24,9 +24,9 @@ struct lonlat {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void layer_to_geojson(FILE *fp, mvt_layer &layer, unsigned z, unsigned x, unsigned y, bool comma, bool name) {
|
void layer_to_geojson(FILE *fp, mvt_layer const &layer, unsigned z, unsigned x, unsigned y, bool comma, bool name) {
|
||||||
for (size_t f = 0; f < layer.features.size(); f++) {
|
for (size_t f = 0; f < layer.features.size(); f++) {
|
||||||
mvt_feature &feat = layer.features[f];
|
mvt_feature const &feat = layer.features[f];
|
||||||
|
|
||||||
if (comma && f != 0) {
|
if (comma && f != 0) {
|
||||||
fprintf(fp, ",\n");
|
fprintf(fp, ",\n");
|
||||||
|
|||||||
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
void layer_to_geojson(FILE *fp, mvt_layer &layer, unsigned z, unsigned x, unsigned y, bool comma, bool name);
|
void layer_to_geojson(FILE *fp, mvt_layer const &layer, unsigned z, unsigned x, unsigned y, bool comma, bool name);
|
||||||
void fprintq(FILE *f, const char *s);
|
void fprintq(FILE *f, const char *s);
|
||||||
|
|||||||
Reference in New Issue
Block a user