]> git.meshlink.io Git - meshlink/commitdiff
Sync the base configuration directory at the end of meshlink_join().
authorGuus Sliepen <guus@meshlink.io>
Thu, 28 Nov 2019 21:24:05 +0000 (22:24 +0100)
committerGuus Sliepen <guus@meshlink.io>
Thu, 28 Nov 2019 21:24:05 +0000 (22:24 +0100)
While joining a mesh, we create a new current/ subdirectory. While the
contents were already synced to disk, we need to ensure the subdirectory
itself is also synced before returning.

src/meshlink.c

index 575895125fc67ace16e61344907b1b54f5ba62b9..9b30a2a65e383a9f39a00c8e22df4b5796a48f9d 100644 (file)
@@ -662,7 +662,7 @@ static bool finalize_join(meshlink_handle_t *mesh, const void *buf, uint16_t len
        }
 
        /* Ensure the configuration directory metadata is on disk */
-       if(!config_sync(mesh, "current")) {
+       if(!config_sync(mesh, "current") || !sync_path(mesh->confbase)) {
                return false;
        }