- 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)) {
- logger(mesh, MESHLINK_ERROR, "Port for MeshLink instance required!");
- return false;
- }
-
- mesh->self->connection->options = 0;
- mesh->self->connection->protocol_major = PROT_MAJOR;
- mesh->self->connection->protocol_minor = PROT_MINOR;