mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
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.
This commit is contained in:
parent
d97be399c9
commit
da91900135
@ -1385,6 +1385,7 @@ options_act(or_options_t *old_options)
|
|||||||
geoip_dirreq_stats_init(now);
|
geoip_dirreq_stats_init(now);
|
||||||
print_notice = 1;
|
print_notice = 1;
|
||||||
} else {
|
} else {
|
||||||
|
options->DirReqStatistics = 0;
|
||||||
log_notice(LD_CONFIG, "Configured to measure directory request "
|
log_notice(LD_CONFIG, "Configured to measure directory request "
|
||||||
"statistics, but no GeoIP database found! "
|
"statistics, but no GeoIP database found! "
|
||||||
"Please specify a GeoIP database using the "
|
"Please specify a GeoIP database using the "
|
||||||
@ -1397,6 +1398,7 @@ options_act(or_options_t *old_options)
|
|||||||
geoip_entry_stats_init(now);
|
geoip_entry_stats_init(now);
|
||||||
print_notice = 1;
|
print_notice = 1;
|
||||||
} else {
|
} else {
|
||||||
|
options->EntryStatistics = 0;
|
||||||
log_notice(LD_CONFIG, "Configured to measure entry node "
|
log_notice(LD_CONFIG, "Configured to measure entry node "
|
||||||
"statistics, but no GeoIP database found! "
|
"statistics, but no GeoIP database found! "
|
||||||
"Please specify a GeoIP database using the "
|
"Please specify a GeoIP database using the "
|
||||||
|
Loading…
Reference in New Issue
Block a user