-void connection_add(connection_t *c)
-{
- cp();
-
- avl_insert(connection_tree, c);
-}
-
-void connection_del(connection_t *c)
-{
- cp();
-
- avl_delete(connection_tree, c);
-}
-
-void dump_connections(void)
-{
- avl_node_t *node;
- connection_t *c;
-
- cp();
-
- logger(LOG_DEBUG, _("Connections:"));
-
- for(node = connection_tree->head; node; node = node->next) {
- c = node->data;
- logger(LOG_DEBUG, _(" %s at %s options %lx socket %d status %04x"),
- c->name, c->hostname, c->options, c->socket, *(uint32_t *)&c->status);
- }
-
- logger(LOG_DEBUG, _("End of connections."));
+void connection_add(meshlink_handle_t *mesh, connection_t *c) {
+ c->mesh = mesh;
+ list_insert_tail(mesh->connections, c);