meshlink_handle_t *mesh = xzalloc(sizeof *mesh);
mesh->confbase = xstrdup(confbase);
if (usingname) mesh->name = xstrdup(name);
+ mesh->self = new_node();
+ mesh->self->connection = new_connection();
pthread_mutex_init ( &(mesh->outpacketqueue_mutex), NULL);
pthread_mutex_init ( &(mesh->nodes_mutex), NULL);
mesh->threadstarted = false;
return false;
}
- mesh->self = new_node();
- mesh->self->connection = new_connection();
mesh->self->name = name;
mesh->self->connection->name = xstrdup(name);
read_host_config(mesh, mesh->config, name);