sptps_send_record(&(mesh->sptps), 1, b64key, strlen(b64key));
free(b64key);
+ free(mesh->self->name);
+ free(mesh->self->connection->name);
+ mesh->self->name = xstrdup(name);
+ mesh->self->connection->name = xstrdup(name);
+
fprintf(stderr, "Configuration stored in: %s\n", mesh->confbase);
+ load_all_nodes(mesh);
+
return true;
}
extern void receive_tcppacket(struct meshlink_handle *mesh, struct connection_t *, const char *, int);
extern void broadcast_packet(struct meshlink_handle *mesh, const struct node_t *, struct vpn_packet_t *);
extern char *get_name(struct meshlink_handle *mesh);
+extern void load_all_nodes(struct meshlink_handle *mesh);
extern bool setup_myself_reloadable(struct meshlink_handle *mesh);
extern bool setup_network(struct meshlink_handle *mesh);
extern void setup_outgoing_connection(struct meshlink_handle *mesh, struct outgoing_t *);
return mesh->invitation_key;
}
-static void load_all_nodes(meshlink_handle_t *mesh) {
+void load_all_nodes(meshlink_handle_t *mesh) {
DIR *dir;
struct dirent *ent;
char dname[PATH_MAX];
//TODO: callback to application to inform of an accepted invitation
sptps_send_record(&c->sptps, 2, data, 0);
+
+ load_all_nodes(mesh);
+
return true;
}