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) {