}
}
+ /* Ensure the configuration directory metadata is on disk */
+ if(!config_sync(mesh, "current")) {
+ return false;
+ }
+
sptps_send_record(&(mesh->sptps), 1, ecdsa_get_public_key(mesh->private_key), 32);
logger(mesh, MESHLINK_DEBUG, "Configuration stored in: %s\n", mesh->confbase);
return false;
}
+ /* Ensure the configuration directory metadata is on disk */
+ if(!config_sync(mesh, "current")) {
+ return false;
+ }
+
if(!main_config_lock(mesh)) {
logger(NULL, MESHLINK_ERROR, "Cannot lock main config file\n");
meshlink_errno = MESHLINK_ESTORAGE;
mesh->invitation_timeout = 604800; // 1 week
mesh->netns = params->netns;
mesh->submeshes = NULL;
+ mesh->log_cb = global_log_cb;
+ mesh->log_level = global_log_level;
memcpy(mesh->dev_class_traits, default_class_traits, sizeof(default_class_traits));
return false;
}
+ if(!config_sync(mesh, "current")) {
+ return false;
+ }
+
return true;
}
n->status.blacklisted = true;
node_write_config(mesh, n);
+ config_sync(mesh, "current");
+
logger(mesh, MESHLINK_DEBUG, "Blacklisted %s.\n", node->name);
//Immediately terminate any connections we have with the blacklisted node
n->status.blacklisted = false;
node_write_config(mesh, n);
+ config_sync(mesh, "current");
pthread_mutex_unlock(&(mesh->mesh_mutex));
return;