ソースを参照

Disable stats requiring geoip info if we have none

In other parts of the code we will otherwise attempt to collect these
statistics, and that will lead to crashes.
Sebastian Hahn 13 年 前
コミット
da91900135
1 ファイル変更2 行追加0 行削除
  1. 2 0
      src/or/config.c

+ 2 - 0
src/or/config.c

@@ -1385,6 +1385,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 "
@@ -1397,6 +1398,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 "