X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fconnection.c;h=cf5ec1b60507d7815c1d6a730eb3a76b0e356b14;hb=1b30cee086148975886f961aadc26e23b1bfd6f2;hp=18c03c7e8c808377e843f10e77b836296b876f36;hpb=79e46d08a46f2fef2ee4e8eac7ba487007160564;p=tinc diff --git a/src/connection.c b/src/connection.c index 18c03c7e..cf5ec1b6 100644 --- a/src/connection.c +++ b/src/connection.c @@ -78,8 +78,8 @@ void free_connection(connection_t *c) { if(c->buffer) bufferevent_free(c->buffer); - if(event_initialized(&c->inevent)) - event_del(&c->inevent); + if(c->thread) + thread_destroy(&c->thread); free(c); } @@ -106,14 +106,3 @@ bool dump_connections(connection_t *cdump) { return send_request(cdump, "%d %d", CONTROL, REQ_DUMP_CONNECTIONS); } - -bool read_connection_config(connection_t *c) { - char *fname; - bool x; - - xasprintf(&fname, "%s/hosts/%s", confbase, c->name); - x = read_config_file(c->config_tree, fname); - free(fname); - - return x; -}