summaryrefslogtreecommitdiff
path: root/src/or/connection.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-08-12 16:11:28 -0400
committerNick Mathewson <nickm@torproject.org>2016-08-12 16:11:28 -0400
commit7f145b54afb2cb1d9390a65bf31e2dddeb5b87da (patch)
treef184f7c342e95e36a6b80e2c7fddde7f76c3aa7e /src/or/connection.h
parent14d58bbb4a9f08d51a58ea0a75d5535a05bfc9e8 (diff)
parentbbc9cbd95839380a45ec9ff11a7f7b99bbe923b0 (diff)
downloadtor-7f145b54afb2cb1d9390a65bf31e2dddeb5b87da.tar.gz
tor-7f145b54afb2cb1d9390a65bf31e2dddeb5b87da.zip
Merge remote-tracking branch 'public/Fix_19450'
Diffstat (limited to 'src/or/connection.h')
-rw-r--r--src/or/connection.h26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/or/connection.h b/src/or/connection.h
index 4417b899f7..f8e0f73246 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);
@@ -257,20 +247,6 @@ void clock_skew_warning(const connection_t *conn, long apparent_skew,
int trusted, log_domain_mask_t domain,
const char *received, const char *source);
-#ifdef USE_BUFFEREVENTS
-int connection_type_uses_bufferevent(connection_t *conn);
-void connection_configure_bufferevent_callbacks(connection_t *conn);
-void connection_handle_read_cb(struct bufferevent *bufev, void *arg);
-void connection_handle_write_cb(struct bufferevent *bufev, void *arg);
-void connection_handle_event_cb(struct bufferevent *bufev, short event,
- void *arg);
-void connection_get_rate_limit_totals(uint64_t *read_out,
- uint64_t *written_out);
-void connection_enable_rate_limiting(connection_t *conn);
-#else
-#define connection_type_uses_bufferevent(c) (0)
-#endif
-
#ifdef CONNECTION_PRIVATE
STATIC void connection_free_(connection_t *conn);