mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
Search for remaining references to 'bufferevent'.
Remove or adjust as appropriate.
This commit is contained in:
parent
46ef4487d3
commit
4d4ccc505b
27
configure.ac
27
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 ------------------------------------------------------
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user