]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'maint-0.2.1'
authorRoger Dingledine <arma@torproject.org>
Fri, 23 Apr 2010 23:46:29 +0000 (19:46 -0400)
committerRoger Dingledine <arma@torproject.org>
Fri, 23 Apr 2010 23:46:29 +0000 (19:46 -0400)
1  2 
src/or/circuituse.c
src/or/main.c
src/or/or.h

index 9eda9e2480cd8c7e2b6dfc88429b0bce60d59142,827c4bbf2b61cfbbd95aa0cac9a504441c796466..7e47e60559d3f8b30e99d767cc2d5912441d4e79
@@@ -17,11 -17,9 +17,11 @@@ extern circuit_t *global_circuitlist; /
  
  /********* END VARIABLES ************/
  
- static void circuit_expire_old_circuits(time_t now);
+ static void circuit_expire_old_circuits_clientside(time_t now);
  static void circuit_increment_failure_count(void);
  
 +long int lround(double x);
 +
  /** Return 1 if <b>circ</b> could be returned by circuit_get_best().
   * Else return 0.
   */
@@@ -656,18 -628,10 +656,18 @@@ circuit_detach_stream(circuit_t *circ, 
   * for too long and has no streams on it: mark it for close.
   */
  static void
- circuit_expire_old_circuits(time_t now)
+ circuit_expire_old_circuits_clientside(time_t now)
  {
    circuit_t *circ;
 -  time_t cutoff = now - get_options()->CircuitIdleTimeout;
 +  time_t cutoff;
 +
 +  if (circuit_build_times_needs_circuits(&circ_times)) {
 +    /* Circuits should be shorter lived if we need more of them
 +     * for learning a good build timeout */
 +    cutoff = now - IDLE_TIMEOUT_WHILE_LEARNING;
 +  } else {
 +    cutoff = now - get_options()->CircuitIdleTimeout;
 +  }
  
    for (circ = global_circuitlist; circ; circ = circ->next) {
      if (circ->marked_for_close || ! CIRCUIT_IS_ORIGIN(circ))
diff --cc src/or/main.c
Simple merge
diff --cc src/or/or.h
Simple merge