]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
try loading the bandwidth measurement file on startup too,
authorRoger Dingledine <arma@torproject.org>
Mon, 6 Jul 2009 02:47:36 +0000 (22:47 -0400)
committerMike Perry <mikeperry-git@fscked.org>
Thu, 6 Aug 2009 18:48:03 +0000 (11:48 -0700)
in case it's broken.

src/or/config.c

index 952ac00bef63889a2d56c1f362ac1d492023a71a..d0f6c8393b511bd953d9d88be1ee52e07adcc976 100644 (file)
@@ -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)