]> git.ipfire.org Git - people/ms/libloc.git/commitdiff
writer: Write countries before pool is being written
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 15 Oct 2019 15:06:31 +0000 (15:06 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 15 Oct 2019 15:06:31 +0000 (15:06 +0000)
Otherwise the names will obviously not be written

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/writer.c

index bf3d2bb9faa3c42a8c9a96f06c4052540daa6f55..60a129bd3a45770e0ab8c13e434fb8881d838876 100644 (file)
@@ -507,13 +507,13 @@ LOC_EXPORT int loc_writer_write(struct loc_writer* writer, FILE* f) {
        if (r)
                return r;
 
-       // Write pool
-       r = loc_database_write_pool(writer, &header, &offset, f);
+       // Write countries
+       r = loc_database_write_countries(writer, &header, &offset, f);
        if (r)
                return r;
 
-       // Write countries
-       r = loc_database_write_countries(writer, &header, &offset, f);
+       // Write pool
+       r = loc_database_write_pool(writer, &header, &offset, f);
        if (r)
                return r;