[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Drop detection logic for pre-1.3 busted libevents



commit b30d06255c2416515a0d56a99f3d0af4bbfa1185
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Jan 16 14:31:01 2013 -0500

    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
---
 changes/bug6826              |    5 ++++
 src/common/compat_libevent.c |   44 +----------------------------------------
 2 files changed, 7 insertions(+), 42 deletions(-)

diff --git a/changes/bug6826 b/changes/bug6826
new file mode 100644
index 0000000..6eba19b
--- /dev/null
+++ b/changes/bug6826
@@ -0,0 +1,5 @@
+  o Removed features:
+    - Drop support for detecting and warning about versions of Libevent
+      before 1.3e. Nothing reasonable ships with them any longer;
+      warning the user about them shouldn't be needed. Resolves ticket
+      6826.
diff --git a/src/common/compat_libevent.c b/src/common/compat_libevent.c
index 4909386..2f41ed9 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;



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits