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

[or-cvs] r8632: backport 8604: - When testing reachability of our DirPort, d (in tor/branches/tor-0_1_1-patches: . src/or)



Author: arma
Date: 2006-10-07 03:28:15 -0400 (Sat, 07 Oct 2006)
New Revision: 8632

Modified:
   tor/branches/tor-0_1_1-patches/ChangeLog
   tor/branches/tor-0_1_1-patches/src/or/router.c
Log:
backport 8604:
    - When testing reachability of our DirPort, don't launch new
      tests when there's already one in progress -- unreachable
      servers were stacking up dozens of testing streams.


Modified: tor/branches/tor-0_1_1-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_1_1-patches/ChangeLog	2006-10-07 06:30:48 UTC (rev 8631)
+++ tor/branches/tor-0_1_1-patches/ChangeLog	2006-10-07 07:28:15 UTC (rev 8632)
@@ -8,8 +8,11 @@
       its circuits on demand.
     - If none of our live entry guards have a high uptime, but we
       require a guard with a high uptime, try adding a new guard before
-      we give up on our requirement. This patch should make long-lived
+      we give up on the requirement. This patch should make long-lived
       connections more stable on average.
+    - When testing reachability of our DirPort, don't launch new
+      tests when there's already one in progress -- unreachable
+      servers were stacking up dozens of testing streams.
 
   o Minor bugfixes:
     - Avoid a memory corruption bug when creating a hash table for

Modified: tor/branches/tor-0_1_1-patches/src/or/router.c
===================================================================
--- tor/branches/tor-0_1_1-patches/src/or/router.c	2006-10-07 06:30:48 UTC (rev 8631)
+++ tor/branches/tor-0_1_1-patches/src/or/router.c	2006-10-07 07:28:15 UTC (rev 8632)
@@ -461,7 +461,10 @@
     circuit_launch_by_router(CIRCUIT_PURPOSE_TESTING, me, 0, 1, 1);
   }
 
-  if (!check_whether_dirport_reachable()) {
+  if (!check_whether_dirport_reachable() &&
+      !connection_get_by_type_addr_port_purpose(
+                CONN_TYPE_DIR, me->addr, me->dir_port,
+                DIR_PURPOSE_FETCH_SERVERDESC)) {
     /* ask myself, via tor, for my server descriptor. */
     directory_initiate_command_router(me, DIR_PURPOSE_FETCH_SERVERDESC,
                                       1, "authority", NULL, 0);