From b30d06255c2416515a0d56a99f3d0af4bbfa1185 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 16 Jan 2013 14:31:01 -0500 Subject: 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 --- src/common/compat_libevent.c | 44 ++------------------------------------------ 1 file changed, 2 insertions(+), 42 deletions(-) (limited to 'src/common/compat_libevent.c') diff --git a/src/common/compat_libevent.c b/src/common/compat_libevent.c index 4909386f59..2f41ed9455 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; -- cgit v1.2.3-54-g00ecf