- mesh->listen_sockets++;
- success = true;
- }
-
- freeaddrinfo(ai);
- return success;
-}
-
-/*
- Configure node_t mesh->self and set up the local sockets (listen only)
-*/
-bool setup_myself(meshlink_handle_t *mesh) {
- char *name;
- char *address = NULL;
-
- if(!(name = get_name(mesh))) {
- logger(mesh, MESHLINK_ERROR, "Name for MeshLink instance required!");
- return false;
- }
-
- mesh->self = new_node();
- mesh->self->connection = new_connection();
- mesh->self->name = name;
- mesh->self->devclass = mesh->devclass;
- mesh->self->connection->name = xstrdup(name);
- read_host_config(mesh, mesh->config, name);
-
- if(!get_config_string(lookup_config(mesh->config, "Port"), &mesh->myport)) {
- int port = check_port(mesh);