]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Disable stats requiring geoip info if we have none
authorSebastian Hahn <sebastian@torproject.org>
Wed, 22 Dec 2010 07:34:41 +0000 (08:34 +0100)
committerSebastian Hahn <sebastian@torproject.org>
Sat, 29 Oct 2011 09:20:02 +0000 (11:20 +0200)
In other parts of the code we will otherwise attempt to collect these
statistics, and that will lead to crashes.

src/or/config.c

index 78e433620df13714afea07680fe7c29a717a5029..ca4e71cccd513b6367451fd911886fc745a2f021 100644 (file)
@@ -1425,6 +1425,7 @@ options_act(or_options_t *old_options)
         geoip_dirreq_stats_init(now);
         print_notice = 1;
       } else {
+        options->DirReqStatistics = 0;
         log_notice(LD_CONFIG, "Configured to measure directory request "
                               "statistics, but no GeoIP database found! "
                               "Please specify a GeoIP database using the "
@@ -1437,6 +1438,7 @@ options_act(or_options_t *old_options)
         geoip_entry_stats_init(now);
         print_notice = 1;
       } else {
+        options->EntryStatistics = 0;
         log_notice(LD_CONFIG, "Configured to measure entry node "
                               "statistics, but no GeoIP database found! "
                               "Please specify a GeoIP database using the "