aboutsummaryrefslogtreecommitdiff
path: root/src/common/compat_libevent.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-01-16 14:31:01 -0500
committerNick Mathewson <nickm@torproject.org>2013-01-17 09:22:57 -0500
commitb30d06255c2416515a0d56a99f3d0af4bbfa1185 (patch)
tree80cdbc5daf73e423c94e5ea6fc0be27f43a72c65 /src/common/compat_libevent.c
parent65e6e68981d9910c5f78f2cfed6c59cbee1494c7 (diff)
downloadtor-b30d06255c2416515a0d56a99f3d0af4bbfa1185.tar
tor-b30d06255c2416515a0d56a99f3d0af4bbfa1185.tar.gz
Drop detection logic for pre-1.3 busted libevents
This won't actually break them any worse than they were broken before: it just removes a set of warnings that nobody was actually seeing, I hope. Closes 6826
Diffstat (limited to 'src/common/compat_libevent.c')
-rw-r--r--src/common/compat_libevent.c44
1 files changed, 2 insertions, 42 deletions
diff --git a/src/common/compat_libevent.c b/src/common/compat_libevent.c
index 4909386f5..2f41ed945 100644
--- a/src/common/compat_libevent.c
+++ b/src/common/compat_libevent.c
@@ -407,39 +407,15 @@ void
tor_check_libevent_version(const char *m, int server,
const char **badness_out)
{
- int buggy = 0, iffy = 0, slow = 0, thread_unsafe = 0;
+ int thread_unsafe = 0;
le_version_t version;
const char *v = NULL;
const char *badness = NULL;
const char *sad_os = "";
+ (void) m;
version = tor_get_libevent_version(&v);
- /* It would be better to disable known-buggy methods rather than warning
- * about them. But the problem is that with older versions of Libevent,
- * it's not trivial to get them to change their methods once they're
- * initialized... and with newer versions of Libevent, they aren't actually
- * broken. But we should revisit this if we ever find a post-1.4 version
- * of Libevent where we need to disable a given method. */
- if (!strcmp(m, "kqueue")) {
- if (version < V_OLD(1,1,'b'))
- buggy = 1;
- } else if (!strcmp(m, "epoll")) {
- if (version < V(1,1,0))
- iffy = 1;
- } else if (!strcmp(m, "poll")) {
- if (version < V_OLD(1,0,'e'))
- buggy = 1;
- if (version < V(1,1,0))
- slow = 1;
- } else if (!strcmp(m, "select")) {
- if (version < V(1,1,0))
- slow = 1;
- } else if (!strcmp(m, "win32")) {
- if (version < V_OLD(1,1,'b'))
- buggy = 1;
- }
-
/* Libevent versions before 1.3b do very badly on operating systems with
* user-space threading implementations. */
#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
@@ -459,22 +435,6 @@ tor_check_libevent_version(const char *m, int server,
"Libevent version %s often crashes when running a Tor server with %s. "
"Please use the latest version of libevent (1.3b or later)",v,sad_os);
badness = "BROKEN";
- } else if (buggy) {
- log(LOG_WARN, LD_GENERAL,
- "There are serious bugs in using %s with libevent %s. "
- "Please use the latest version of libevent.", m, v);
- badness = "BROKEN";
- } else if (iffy) {
- log(LOG_WARN, LD_GENERAL,
- "There are minor bugs in using %s with libevent %s. "
- "You may want to use the latest version of libevent.", m, v);
- badness = "BUGGY";
- } else if (slow && server) {
- log(LOG_WARN, LD_GENERAL,
- "libevent %s can be very slow with %s. "
- "When running a server, please use the latest version of libevent.",
- v,m);
- badness = "SLOW";
}
*badness_out = badness;