diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-08-02 13:15:10 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-08-02 13:15:10 -0400 |
commit | c68a23a135369380dad5cb1ff393edee74e6d6ac (patch) | |
tree | 07d73988f70fcaf6a61ccf94a87dacd7e68eed5e /src/or/connection_edge.c | |
parent | 8e9a6543e110eb8f96169f011e18c3e4b6a4f7d1 (diff) | |
download | tor-c68a23a135369380dad5cb1ff393edee74e6d6ac.tar.gz tor-c68a23a135369380dad5cb1ff393edee74e6d6ac.zip |
Bufferevent removal: remove HAS_BUFFEREVENT macros and usage
This is another way that we had bufferevents-only code marked.
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 799baa2acc..d5eada61d8 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -478,8 +478,7 @@ connection_edge_finished_connecting(edge_connection_t *edge_conn) rep_hist_note_exit_stream_opened(conn->port); conn->state = EXIT_CONN_STATE_OPEN; - IF_HAS_NO_BUFFEREVENT(conn) - connection_watch_events(conn, READ_EVENT); /* stop writing, keep reading */ + connection_watch_events(conn, READ_EVENT); /* stop writing, keep reading */ if (connection_get_outbuf_len(conn)) /* in case there are any queued relay * cells */ connection_start_writing(conn); @@ -2008,14 +2007,8 @@ connection_ap_handshake_process_socks(entry_connection_t *conn) log_debug(LD_APP,"entered."); - IF_HAS_BUFFEREVENT(base_conn, { - struct evbuffer *input = bufferevent_get_input(base_conn->bufev); - sockshere = fetch_from_evbuffer_socks(input, socks, - options->TestSocks, options->SafeSocks); - }) ELSE_IF_NO_BUFFEREVENT { - sockshere = fetch_from_buf_socks(base_conn->inbuf, socks, - options->TestSocks, options->SafeSocks); - }; + sockshere = fetch_from_buf_socks(base_conn->inbuf, socks, + options->TestSocks, options->SafeSocks); if (socks->replylen) { had_reply = 1; @@ -3225,11 +3218,9 @@ connection_exit_connect(edge_connection_t *edge_conn) conn->state = EXIT_CONN_STATE_OPEN; if (connection_get_outbuf_len(conn)) { /* in case there are any queued data cells, from e.g. optimistic data */ - IF_HAS_NO_BUFFEREVENT(conn) - connection_watch_events(conn, READ_EVENT|WRITE_EVENT); + connection_watch_events(conn, READ_EVENT|WRITE_EVENT); } else { - IF_HAS_NO_BUFFEREVENT(conn) - connection_watch_events(conn, READ_EVENT); + connection_watch_events(conn, READ_EVENT); } /* also, deliver a 'connected' cell back through the circuit. */ |