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_or.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_or.c')
-rw-r--r-- | src/or/connection_or.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index c22e92cd55..4de64b2347 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -1361,12 +1361,9 @@ connection_tls_start_handshake,(or_connection_t *conn, int receiving)) conn->base_.s); note_crypto_pk_op(receiving ? TLS_HANDSHAKE_S : TLS_HANDSHAKE_C); - IF_HAS_BUFFEREVENT(TO_CONN(conn), { - /* ???? */; - }) ELSE_IF_NO_BUFFEREVENT { - if (connection_tls_continue_handshake(conn) < 0) - return -1; - } + if (connection_tls_continue_handshake(conn) < 0) + return -1; + return 0; } @@ -1872,11 +1869,7 @@ connection_or_set_state_open(or_connection_t *conn) or_handshake_state_free(conn->handshake_state); conn->handshake_state = NULL; - IF_HAS_BUFFEREVENT(TO_CONN(conn), { - connection_watch_events(TO_CONN(conn), READ_EVENT|WRITE_EVENT); - }) ELSE_IF_NO_BUFFEREVENT { - connection_start_reading(TO_CONN(conn)); - } + connection_start_reading(TO_CONN(conn)); return 0; } @@ -1936,12 +1929,7 @@ static int connection_fetch_var_cell_from_buf(or_connection_t *or_conn, var_cell_t **out) { connection_t *conn = TO_CONN(or_conn); - IF_HAS_BUFFEREVENT(conn, { - struct evbuffer *input = bufferevent_get_input(conn->bufev); - return fetch_var_cell_from_evbuffer(input, out, or_conn->link_proto); - }) ELSE_IF_NO_BUFFEREVENT { - return fetch_var_cell_from_buf(conn->inbuf, out, or_conn->link_proto); - } + return fetch_var_cell_from_buf(conn->inbuf, out, or_conn->link_proto); } /** Process cells from <b>conn</b>'s inbuf. |