]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge remote branch 'origin/maint-0.2.2'
authorNick Mathewson <nickm@torproject.org>
Mon, 14 Mar 2011 19:31:24 +0000 (15:31 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 14 Mar 2011 19:31:24 +0000 (15:31 -0400)
Fix trivial add/add conflict in main.c

Conflicts:
src/or/main.c

1  2 
src/or/dirserv.c
src/or/dirserv.h
src/or/main.c

index cbf8c3685a99d32af3ac996e40ad6819907f50a6,18abd1865f04c9ee6a977ce06041593e40bc682a..1796c28418cb72e5981776668b723954ad0508dd
@@@ -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 <b>routers</b>, allocate the
Simple merge
diff --cc src/or/main.c
index c1335ff5d942664b24c509e3d3ccfeab1167be1e,214a4fad5da01e4d41f7efb77f33f7cb2ca9b647..9c1948599064f6b12bc70dbc2a2e42d2bd47bf4f
@@@ -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;