Просмотр исходного кода

try loading the bandwidth measurement file on startup too,

in case it's broken.
Roger Dingledine 16 лет назад
Родитель
Сommit
da88e05edc
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      src/or/config.c

+ 4 - 0
src/or/config.c

@@ -3208,6 +3208,10 @@ options_validate(or_options_t *old_options, or_options_t *options,
           options->V3AuthoritativeDir))
       REJECT("AuthoritativeDir is set, but none of "
              "(Bridge/HS/V1/V2/V3)AuthoritativeDir is set.");
+    /* If we have a v3bandwidthsfile and it's broken, complain on startup */
+    if (options->V3BandwidthsFile && !old_options) {
+      dirserv_read_measured_bandwidths(options->V3BandwidthsFile, NULL);
+    }
   }
 
   if (options->AuthoritativeDir && !options->DirPort)