X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnode.c;h=b0965301c05ea7bd507499dc1e5d7e6b66dfd259;hb=67df7fb7e1c9eefe4bbc920fdc68b595ef28abd9;hp=351991611b2cd2a3d692213b6866cb50df7c4a25;hpb=af86a3226ea42375644b3f99c182c778d327de1e;p=tinc diff --git a/src/node.c b/src/node.c index 35199161..b0965301 100644 --- a/src/node.c +++ b/src/node.c @@ -1,7 +1,7 @@ /* node.c -- node tree management - Copyright (C) 2001-2003 Guus Sliepen , - 2001-2003 Ivo Timmermans + Copyright (C) 2001-2006 Guus Sliepen , + 2001-2005 Ivo Timmermans This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: node.c,v 1.1.2.31 2003/12/22 11:04:16 guus Exp $ + $Id$ */ #include "system.h" @@ -78,7 +78,6 @@ node_t *new_node(void) n->subnet_tree = new_subnet_tree(); n->edge_tree = new_edge_tree(); - n->queue = list_alloc((list_action_t) free); EVP_CIPHER_CTX_init(&n->packet_ctx); n->mtu = MTU; n->maxmtu = MTU; @@ -90,15 +89,6 @@ void free_node(node_t *n) { cp(); - if(n->queue) - list_delete_list(n->queue); - - if(n->name) - free(n->name); - - if(n->hostname) - free(n->hostname); - if(n->key) free(n->key); @@ -112,9 +102,17 @@ void free_node(node_t *n) EVP_CIPHER_CTX_cleanup(&n->packet_ctx); - if(n->mtuevent) + if(n->mtuevent) { event_del(n->mtuevent); + free_event(n->mtuevent); + } + if(n->hostname) + free(n->hostname); + + if(n->name) + free(n->name); + free(n); } @@ -123,7 +121,6 @@ void node_add(node_t *n) cp(); avl_insert(node_tree, n); - avl_insert(node_udp_tree, n); } void node_del(node_t *n) @@ -147,7 +144,6 @@ void node_del(node_t *n) } avl_delete(node_tree, n); - avl_delete(node_udp_tree, n); } node_t *lookup_node(char *name)