diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-08-02 13:59:47 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-08-02 13:59:47 -0400 |
commit | 4d4ccc505b0c9639c68b42645d5a29497c48fe4d (patch) | |
tree | e4c12832ff423ac86ba16e39444b88ab5f648d1b | |
parent | 46ef4487d3914cac1aba148ec58ff271bda3c636 (diff) | |
download | tor-4d4ccc505b0c9639c68b42645d5a29497c48fe4d.tar.gz tor-4d4ccc505b0c9639c68b42645d5a29497c48fe4d.zip |
Search for remaining references to 'bufferevent'.
Remove or adjust as appropriate.
-rw-r--r-- | configure.ac | 27 | ||||
-rw-r--r-- | src/common/compat_libevent.h | 4 | ||||
-rw-r--r-- | src/or/channeltls.c | 2 | ||||
-rw-r--r-- | src/or/connection.c | 6 | ||||
-rw-r--r-- | src/or/connection.h | 2 | ||||
-rw-r--r-- | src/or/main.c | 2 | ||||
-rw-r--r-- | src/test/test_channeltls.c | 3 |
7 files changed, 9 insertions, 37 deletions
diff --git a/configure.ac b/configure.ac index 140bd4c8e1..bc2f515c4c 100644 --- a/configure.ac +++ b/configure.ac @@ -161,9 +161,6 @@ AC_ARG_ENABLE(tor2web-mode, CFLAGS="$CFLAGS -D ENABLE_TOR2WEB_MODE=1" fi]) -AC_ARG_ENABLE(bufferevents, - AS_HELP_STRING(--enable-bufferevents, [use Libevent's buffered IO])) - AC_ARG_ENABLE(tool-name-check, AS_HELP_STRING(--disable-tool-name-check, [check for sanely named toolchain when cross-compiling])) @@ -550,30 +547,6 @@ LIBS="$save_LIBS" LDFLAGS="$save_LDFLAGS" CPPFLAGS="$save_CPPFLAGS" -dnl bufferents require version 2.0.13 -if test "$enable_bufferevents" = "yes"; then - AC_CHECK_HEADERS(event2/bufferevent_ssl.h) - - CPPFLAGS="$CPPFLAGS $TOR_CPPFLAGS_libevent" - - AC_MSG_CHECKING([whether Libevent is new enough for bufferevents]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include <event2/event.h> -#if !defined(LIBEVENT_VERSION_NUMBER) || LIBEVENT_VERSION_NUMBER < 0x02000d00 -#error -int x = y(zz); -#else -int x = 1; -#endif - ])], [ AC_MSG_RESULT([yes]) ], - [ AC_MSG_RESULT([no]) - AC_MSG_ERROR([Libevent does not seem new enough to support bufferevents. We require 2.0.13-stable or later]) ] ) -fi - -LIBS="$save_LIBS" -LDFLAGS="$save_LDFLAGS" -CPPFLAGS="$save_CPPFLAGS" - AC_SUBST(TOR_LIBEVENT_LIBS) dnl ------------------------------------------------------ diff --git a/src/common/compat_libevent.h b/src/common/compat_libevent.h index 33da4fe782..b1449b9c15 100644 --- a/src/common/compat_libevent.h +++ b/src/common/compat_libevent.h @@ -34,10 +34,10 @@ void periodic_timer_free(periodic_timer_t *); /** Defines a configuration for using libevent with Tor: passed as an argument * to tor_libevent_initialize() to describe how we want to set up. */ typedef struct tor_libevent_cfg { - /** How many CPUs should we use (relevant only with IOCP). */ + /** How many CPUs should we use (not currently useful). */ int num_cpus; /** How many milliseconds should we allow between updating bandwidth limits? - * (relevant only with bufferevents). */ + * (Not currently useful). */ int msec_per_tick; } tor_libevent_cfg; diff --git a/src/or/channeltls.c b/src/or/channeltls.c index 2bb88dd505..ac0c5122e7 100644 --- a/src/or/channeltls.c +++ b/src/or/channeltls.c @@ -1192,6 +1192,8 @@ channel_tls_handle_var_cell(var_cell_t *var_cell, or_connection_t *conn) * notice "hey, data arrived!" before we notice "hey, the handshake * finished!" And we need to be accepting both at once to handle both * the v2 and v3 handshakes. */ + /* But that should be happening any longer've disabled bufferevents. */ + tor_assert_nonfatal_unreached_once(); /* fall through */ case OR_CONN_STATE_TLS_SERVER_RENEGOTIATING: diff --git a/src/or/connection.c b/src/or/connection.c index 40fc2bc662..ceb2883e3f 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -3567,8 +3567,8 @@ connection_fetch_from_buf_line(connection_t *conn, char *data, return fetch_from_buf_line(conn->inbuf, data, data_len); } -/** As fetch_from_buf_http, but fetches from a connection's input buffer_t or - * its bufferevent as appropriate. */ +/** As fetch_from_buf_http, but fetches from a connection's input buffer_t as + * appropriate. */ int connection_fetch_from_buf_http(connection_t *conn, char **headers_out, size_t max_headerlen, @@ -3880,7 +3880,7 @@ connection_handle_write(connection_t *conn, int force) * Try to flush data that's waiting for a write on <b>conn</b>. Return * -1 on failure, 0 on success. * - * Don't use this function for regular writing; the buffers/bufferevents + * Don't use this function for regular writing; the buffers * system should be good enough at scheduling writes there. Instead, this * function is for cases when we're about to exit or something and we want * to report it right away. diff --git a/src/or/connection.h b/src/or/connection.h index 6c531c0a6e..c219ea4a86 100644 --- a/src/or/connection.h +++ b/src/or/connection.h @@ -247,8 +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); -#define connection_type_uses_bufferevent(c) (0) - #ifdef CONNECTION_PRIVATE STATIC void connection_free_(connection_t *conn); diff --git a/src/or/main.c b/src/or/main.c index 0a689ba77c..a48b482f5b 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1977,7 +1977,7 @@ systemd_watchdog_callback(periodic_timer_t *timer, void *arg) static periodic_timer_t *refill_timer = NULL; /** Libevent callback: invoked periodically to refill token buckets - * and count r/w bytes. It is only used when bufferevents are disabled. */ + * and count r/w bytes. */ static void refill_callback(periodic_timer_t *timer, void *arg) { diff --git a/src/test/test_channeltls.c b/src/test/test_channeltls.c index 394612f155..bde46a2998 100644 --- a/src/test/test_channeltls.c +++ b/src/test/test_channeltls.c @@ -124,8 +124,7 @@ test_channeltls_num_bytes_queued(void *arg) * Next, we have to test ch->num_bytes_queued, which is * channel_tls_num_bytes_queued_method. We can't mock * connection_get_outbuf_len() directly because it's static inline - * in connection.h, but we can mock buf_datalen(). Note that - * if bufferevents ever work, this will break with them enabled. + * in connection.h, but we can mock buf_datalen(). */ tt_assert(ch->num_bytes_queued != NULL); |