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

[or-cvs] only start testing reachability once we"ve established a ci...



Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	circuitbuild.c main.c 
Log Message:
only start testing reachability once we've established a circuit.
this will make startup on dirservers less noisy.
it may also break things in subtle ways.


Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.210
retrieving revision 1.211
diff -u -p -d -r1.210 -r1.211
--- circuitbuild.c	17 Jan 2006 04:03:23 -0000	1.210
+++ circuitbuild.c	29 Jan 2006 01:11:41 -0000	1.211
@@ -610,6 +610,7 @@ circuit_send_next_onion_skin(circuit_t *
             "Tor has successfully opened a circuit. Looks like it's working.");
         if (server_mode(options) && !check_whether_orport_reachable()) {
           inform_testing_reachability();
+          consider_testing_reachability();
         }
       }
       circuit_rep_hist_note_result(circ);

Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.616
retrieving revision 1.617
diff -u -p -d -r1.616 -r1.617
--- main.c	26 Jan 2006 19:11:06 -0000	1.616
+++ main.c	29 Jan 2006 01:11:41 -0000	1.617
@@ -575,7 +575,7 @@ directory_info_has_arrived(time_t now, i
       !we_are_hibernating()) { /* connect to the appropriate routers */
     if (!authdir_mode(options))
       router_retry_connections(0, 1);
-    if (!from_cache)
+    if (!from_cache && has_completed_circuit)
       consider_testing_reachability();
   }
 }
@@ -826,6 +826,7 @@ run_scheduled_events(time_t now)
     /* also, check religiously for reachability, if it's within the first
      * 20 minutes of our uptime. */
     if (server_mode(options) &&
+        has_completed_circuit &&
         stats_n_seconds_working < TIMEOUT_UNTIL_UNREACHABILITY_COMPLAINT &&
         !we_are_hibernating())
       consider_testing_reachability();