aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2009-08-14 14:45:53 +0200
committerKarsten Loesing <karsten.loesing@gmx.net>2009-08-17 13:29:50 +0200
commitab7729f4724efbfac33c069f488e74c8ccc058f1 (patch)
tree5872b0d5d06ee934549507dbf3f8d26fc6cfe1ed /src/or/router.c
parent9d16a59fccd997b266b5cacde2acfd691002bf7a (diff)
downloadtor-ab7729f4724efbfac33c069f488e74c8ccc058f1.tar.gz
tor-ab7729f4724efbfac33c069f488e74c8ccc058f1.zip
Remove ./configure option for entry and dir request statistics.
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/or/router.c b/src/or/router.c
index d5a2576842..c66b66f0ea 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1907,13 +1907,9 @@ char *
extrainfo_get_client_geoip_summary(time_t now)
{
static time_t last_purged_at = 0;
- int geoip_purge_interval = 48*60*60;
-#ifdef ENABLE_DIRREQ_STATS
- geoip_purge_interval = DIR_RECORD_USAGE_RETAIN_IPS;
-#endif
-#ifdef ENABLE_ENTRY_STATS
- geoip_purge_interval = ENTRY_RECORD_USAGE_RETAIN_IPS;
-#endif
+ int geoip_purge_interval =
+ (get_options()->DirReqStatistics || get_options()->EntryStatistics) ?
+ DIR_ENTRY_RECORD_USAGE_RETAIN_IPS : 48*60*60;
if (now > last_purged_at+geoip_purge_interval) {
/* (Note that this also discards items in the client history with
* action GEOIP_CLIENT_NETWORKSTATUS{_V2}, which doesn't matter
@@ -1922,7 +1918,7 @@ extrainfo_get_client_geoip_summary(time_t now)
geoip_remove_old_clients(now-geoip_purge_interval);
last_purged_at = now;
}
- return geoip_get_client_history(now, GEOIP_CLIENT_CONNECT);
+ return geoip_get_client_history_bridge(now, GEOIP_CLIENT_CONNECT);
}
/** Return true iff <b>s</b> is a legally valid server nickname. */