Переглянути джерело

try loading the bandwidth measurement file on startup too,

in case it's broken.
Roger Dingledine 16 роки тому
батько
коміт
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)