]> git.meshlink.io Git - meshlink/commitdiff
We dont check the name in the config file but the name in the handler. This is becaus... testing/invitations
authorSaverio Proto <zioproto@gmail.com>
Tue, 17 Jun 2014 17:42:52 +0000 (19:42 +0200)
committerSaverio Proto <zioproto@gmail.com>
Tue, 17 Jun 2014 17:42:52 +0000 (19:42 +0200)
src/net_setup.c

index 97ef4f1339fe77d896f9fba0d954b79bab977a14..2ec901e8e0ecec0914fb1c7b088e3c78f51b55b8 100644 (file)
@@ -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) {