浏览代码

r18288@catbus: nickm | 2008-02-20 21:18:38 -0500
Recover from bad tracked-since value in mtbf history file. This may finally close bug 537.


svn:r13636

Nick Mathewson 16 年之前
父节点
当前提交
ae507a61cc
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 2 0
      ChangeLog
  2. 1 1
      src/or/rephist.c

+ 2 - 0
ChangeLog

@@ -59,6 +59,8 @@ Changes in version 0.2.0.20-?? - 2008-02-??
       directory request. Now compare correctly. Noticed by Veracode.
     - When starting as an authority, do not overwrite all certificates
       cached from other authorities.  Bugfix on 0.2.0.x.  Fixes bug 606.
+    - Recover from bad tracked-since value in MTBF-history file.
+      Should fix bug 537.
 
   o Code simplifications and refactoring:
     - Remove the tor_strpartition function: its logic was confused,

+ 1 - 1
src/or/rephist.c

@@ -954,7 +954,7 @@ rep_hist_load_mtbf_data(time_t now)
   if (strcmp(line, "."))
     log_warn(LD_GENERAL, "Truncated MTBF file.");
 
-  if (!tracked_since)
+  if (tracked_since < 86400*365) /* Recover from insanely early value. */
     tracked_since = latest_possible_start;
 
   stability_last_downrated = last_downrated;