From: Nick Mathewson Date: Mon, 14 Mar 2011 19:31:24 +0000 (-0400) Subject: Merge remote branch 'origin/maint-0.2.2' X-Git-Tag: tor-0.2.3.1-alpha~76 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=f1c365b032e058e7342b632006435ecc175475a3;p=thirdparty%2Ftor.git Merge remote branch 'origin/maint-0.2.2' Fix trivial add/add conflict in main.c Conflicts: src/or/main.c --- f1c365b032e058e7342b632006435ecc175475a3 diff --cc src/or/dirserv.c index cbf8c3685a,18abd1865f..1796c28418 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@@ -994,11 -971,21 +994,21 @@@ dirserv_set_router_is_running(routerinf } if (!answer && running_long_enough_to_decide_unreachable()) { - /* not considered reachable. tell rephist. */ - rep_hist_note_router_unreachable(router->cache_info.identity_digest, now); + /* Not considered reachable. tell rephist about that. + + Because we launch a reachability test for each router every + REACHABILITY_TEST_CYCLE_PERIOD seconds, then the router has probably + been down since at least that time after we last successfully reached + it. + */ + time_t when = now; + if (router->last_reachable && + router->last_reachable + REACHABILITY_TEST_CYCLE_PERIOD < now) + when = router->last_reachable + REACHABILITY_TEST_CYCLE_PERIOD; + rep_hist_note_router_unreachable(router->cache_info.identity_digest, when); } - router->is_running = answer; + node->is_running = answer; } /** Based on the routerinfo_ts in routers, allocate the diff --cc src/or/main.c index c1335ff5d9,214a4fad5d..9c19485990 --- a/src/or/main.c +++ b/src/or/main.c @@@ -1048,10 -872,9 +1048,11 @@@ run_scheduled_events(time_t now static time_t time_to_check_for_expired_networkstatus = 0; static time_t time_to_write_stats_files = 0; static time_t time_to_write_bridge_stats = 0; + static time_t time_to_check_port_forwarding = 0; + static time_t time_to_launch_reachability_tests = 0; static int should_init_bridge_stats = 1; static time_t time_to_retry_dns_init = 0; + static time_t time_to_next_heartbeat = 0; or_options_t *options = get_options(); int is_server = server_mode(options); int i;