From: Guus Sliepen Date: Tue, 4 Feb 2020 22:11:34 +0000 (+0100) Subject: Clear reachability times in imported host config files. X-Git-Url: http://git.meshlink.io/?p=meshlink;a=commitdiff_plain;h=b58f3ce8a819286a58141b1ce557b2a3e51bea7e Clear reachability times in imported host config files. This mirrors what we do with host config files received during a join. --- diff --git a/src/meshlink.c b/src/meshlink.c index d1987ab8..a93bdd67 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -2923,7 +2923,11 @@ bool meshlink_import(meshlink_handle_t *mesh, const char *data) { break; } - if(!config_write(mesh, "current", n->name, &config, mesh->config_key)) { + /* Clear the reachability times, since we ourself have never seen these nodes yet */ + n->last_reachable = 0; + n->last_unreachable = 0; + + if(!node_write_config(mesh, n)) { free_node(n); return false; }