From: Saverio Proto Date: Tue, 17 Jun 2014 17:42:52 +0000 (+0200) Subject: We dont check the name in the config file but the name in the handler. This is becaus... X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=84335b679722febe3f75ba0b190ca5d56821288d;p=meshlink We dont check the name in the config file but the name in the handler. This is because the config files can change after finalize_join --- diff --git a/src/net_setup.c b/src/net_setup.c index 97ef4f13..2ec901e8 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -154,20 +154,20 @@ void load_all_nodes(meshlink_handle_t *mesh) { char *get_name(meshlink_handle_t *mesh) { - char *name = NULL; + //char *name = NULL; - get_config_string(lookup_config(mesh->config, "Name"), &name); + //get_config_string(lookup_config(mesh->config, "Name"), &name); - if(!name) + if(!mesh->name) return NULL; - if(!check_id(name)) { + if(!check_id(mesh->name)) { logger(DEBUG_ALWAYS, LOG_ERR, "Invalid name for mesh->self!"); - free(name); + //free(name); return NULL; } - return name; + return mesh->name; } bool setup_myself_reloadable(meshlink_handle_t *mesh) {