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.h | |
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.h')
-rw-r--r-- | src/or/connection.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/or/connection.h b/src/or/connection.h index 7f659dce70..6c531c0a6e 100644 --- a/src/or/connection.h +++ b/src/or/connection.h @@ -57,8 +57,6 @@ void connection_mark_for_close_internal_(connection_t *conn, connection_t *tmp_conn_ = (c); \ connection_mark_for_close_internal_(tmp_conn_, (line), (file)); \ tmp_conn_->hold_open_until_flushed = 1; \ - IF_HAS_BUFFEREVENT(tmp_conn_, \ - connection_start_writing(tmp_conn_)); \ } while (0) #define connection_mark_and_flush_internal(c) \ @@ -166,21 +164,13 @@ static size_t connection_get_outbuf_len(connection_t *conn); static inline size_t connection_get_inbuf_len(connection_t *conn) { - IF_HAS_BUFFEREVENT(conn, { - return evbuffer_get_length(bufferevent_get_input(conn->bufev)); - }) ELSE_IF_NO_BUFFEREVENT { - return conn->inbuf ? buf_datalen(conn->inbuf) : 0; - } + return conn->inbuf ? buf_datalen(conn->inbuf) : 0; } static inline size_t connection_get_outbuf_len(connection_t *conn) { - IF_HAS_BUFFEREVENT(conn, { - return evbuffer_get_length(bufferevent_get_output(conn->bufev)); - }) ELSE_IF_NO_BUFFEREVENT { return conn->outbuf ? buf_datalen(conn->outbuf) : 0; - } } connection_t *connection_get_by_global_id(uint64_t id); |