Remove use of bufferevents and evbuffers.
[tinc] / src / connection.c
index 18c03c7..2fa789b 100644 (file)
@@ -75,11 +75,8 @@ void free_connection(connection_t *c) {
        if(c->config_tree)
                exit_configuration(&c->config_tree);
 
-       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 +103,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;
-}