X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_socket.c;h=a39c2d2813f8532e32634ca01907cbf53fd3c8ee;hp=0f0580ecef97195137981fc7fd635803ac1d3ea7;hb=ff306f0cdaedb50de1472e7c1fb55de922a6ca60;hpb=ce059e36fdb3d3049c278e8b2f36b03c93778996 diff --git a/src/net_socket.c b/src/net_socket.c index 0f0580ec..a39c2d28 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -22,7 +22,6 @@ #include "system.h" -#include "splay_tree.h" #include "conf.h" #include "connection.h" #include "logger.h" @@ -627,9 +626,9 @@ void try_outgoing_connections(void) { /* Terminate any connections whose outgoing_t is to be deleted. */ - for(splay_node_t *n = connection_tree->head, *next; n; n = next) { - next = n->next; - connection_t *c = n->data; + for(list_node_t *node = connection_list->head, *next; node; node = next) { + next = node->next; + connection_t *c = node->data; if(c->outgoing && c->outgoing->timeout == -1) { c->outgoing = NULL; logger(DEBUG_CONNECTIONS, LOG_INFO, "No more outgoing connection to %s", c->name); @@ -639,10 +638,10 @@ void try_outgoing_connections(void) { /* Delete outgoing_ts for which there is no ConnectTo. */ - for(list_node_t *i = outgoing_list->head, *next; i; i = next) { - next = i->next; - outgoing = i->data; + for(list_node_t *node = outgoing_list->head, *next; node; node = next) { + next = node->next; + outgoing = node->data; if(outgoing->timeout == -1) - list_delete_node(outgoing_list, i); + list_delete_node(outgoing_list, node); } }