Use libevent for meta socket input/output buffering.
[tinc] / src / net.c
index 2c7cc55..1b5bb16 100644 (file)
--- a/src/net.c
+++ b/src/net.c
@@ -121,8 +121,6 @@ void terminate_connection(connection_t *c, bool report) {
        if(c->socket)
                closesocket(c->socket);
 
-       event_del(&c->ev);
-
        if(c->edge) {
                if(report && !tunnelserver)
                        send_del_edge(broadcast, c->edge);
@@ -146,12 +144,6 @@ void terminate_connection(connection_t *c, bool report) {
                }
        }
 
-       free(c->outbuf);
-       c->outbuf = NULL;
-       c->outbuflen = 0;
-       c->outbufsize = 0;
-       c->outbufstart = 0;
-
        /* Check if this was our outgoing connection */
 
        if(c->outgoing)