[or-cvs] more bulletproof reachability testing
arma at seul.org
arma at seul.org
Sat Jul 22 05:29:33 UTC 2006
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
config.c main.c
Log Message:
more bulletproof reachability testing
Index: config.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.573
retrieving revision 1.574
diff -u -p -d -r1.573 -r1.574
--- config.c 17 Jul 2006 06:35:06 -0000 1.573
+++ config.c 22 Jul 2006 05:29:31 -0000 1.574
@@ -796,7 +796,8 @@ options_act(or_options_t *old_options)
return -1;
}
server_has_changed_ip();
- if (has_completed_circuit)
+ if (has_completed_circuit ||
+ rep_hist_circbuilding_dormant(time(NULL)))
inform_testing_reachability();
}
cpuworkers_rotate();
Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.653
retrieving revision 1.654
diff -u -p -d -r1.653 -r1.654
--- main.c 21 Jul 2006 07:55:35 -0000 1.653
+++ main.c 22 Jul 2006 05:29:31 -0000 1.654
@@ -568,8 +568,8 @@ directory_info_has_arrived(time_t now, i
return;
}
- if (server_mode(options) && !we_are_hibernating() &&
- !from_cache && has_completed_circuit)
+ if (server_mode(options) && !we_are_hibernating() && !from_cache &&
+ (has_completed_circuit || rep_hist_circbuilding_dormant(now)))
consider_testing_reachability();
}
@@ -833,7 +833,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 &&
+ (has_completed_circuit || rep_hist_circbuilding_dormant(now)) &&
stats_n_seconds_working < TIMEOUT_UNTIL_UNREACHABILITY_COMPLAINT &&
!we_are_hibernating())
consider_testing_reachability();
More information about the tor-commits
mailing list