X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fcontrol.c;h=46300ed9503bf0c4677d476ac86e335b3288f62c;hp=956d6ee10bd066174c4ef406ec8d71020b31de9d;hb=ff306f0cdaedb50de1472e7c1fb55de922a6ca60;hpb=ce059e36fdb3d3049c278e8b2f36b03c93778996 diff --git a/src/control.c b/src/control.c index 956d6ee1..46300ed9 100644 --- a/src/control.c +++ b/src/control.c @@ -100,13 +100,12 @@ bool control_h(connection_t *c, const char *request) { case REQ_DISCONNECT: { char name[MAX_STRING_SIZE]; connection_t *other; - splay_node_t *node, *next; bool found = false; if(sscanf(request, "%*d %*d " MAX_STRING, name) != 1) return control_return(c, REQ_DISCONNECT, -1); - for(node = connection_tree->head; node; node = next) { + for(list_node_t *node = connection_list->head, *next; node; node = next) { next = node->next; other = node->data; if(strcmp(other->name, name))