diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-06-04 14:49:16 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-06-12 14:27:53 -0400 |
commit | 1e709c79d12b2366d4e1c1ea517e313cc29ee3cd (patch) | |
tree | bc87d6e2a8da346a061f387174487bdead78b6b0 /src/or/connection.c | |
parent | 33b1d714e779a714c2d55e5da09d0e3c682f273a (diff) | |
download | tor-1e709c79d12b2366d4e1c1ea517e313cc29ee3cd.tar.gz tor-1e709c79d12b2366d4e1c1ea517e313cc29ee3cd.zip |
Isolate Libevent API dependency to just main.c and dns.c in src/or.
The rest of the code was only including event.h so that it could see
EV_READ and EV_WRITE, which we were using as part of the
connection_watch_events interface for no very good reason.
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 66a62c549a..c8406fee3f 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -299,25 +299,6 @@ connection_link_connections(connection_t *conn_a, connection_t *conn_b) conn_b->linked_conn = conn_a; } -/** Tell libevent that we don't care about <b>conn</b> any more. */ -void -connection_unregister_events(connection_t *conn) -{ - if (conn->read_event) { - if (event_del(conn->read_event)) - log_warn(LD_BUG, "Error removing read event for %d", conn->s); - tor_free(conn->read_event); - } - if (conn->write_event) { - if (event_del(conn->write_event)) - log_warn(LD_BUG, "Error removing write event for %d", conn->s); - tor_free(conn->write_event); - } - if (conn->dns_server_port) { - dnsserv_close_listener(conn); - } -} - /** Deallocate memory used by <b>conn</b>. Deallocate its buffers if * necessary, close its socket if necessary, and mark the directory as dirty * if <b>conn</b> is an OR or OP connection. |