[or-cvs] r15106: Fix last geoip bugs. (tor/trunk/src/or)
nickm at seul.org
nickm at seul.org
Tue Jun 10 20:12:00 UTC 2008
Author: nickm
Date: 2008-06-10 16:11:59 -0400 (Tue, 10 Jun 2008)
New Revision: 15106
Modified:
tor/trunk/src/or/geoip.c
tor/trunk/src/or/main.c
tor/trunk/src/or/routerlist.c
Log:
Fix last geoip bugs.
Modified: tor/trunk/src/or/geoip.c
===================================================================
--- tor/trunk/src/or/geoip.c 2008-06-10 19:51:48 UTC (rev 15105)
+++ tor/trunk/src/or/geoip.c 2008-06-10 20:11:59 UTC (rev 15106)
@@ -559,7 +559,7 @@
format_iso_time(since, request_start);
data_v2 = geoip_get_request_history(now, GEOIP_CLIENT_NETWORKSTATUS_V2);
data_v3 = geoip_get_request_history(now, GEOIP_CLIENT_NETWORKSTATUS);
- if (fprintf(out, "requests-start %s\nn-ns-reqs %s\nn-v2-ns_reqs %s\n",
+ if (fprintf(out, "requests-start %s\nn-ns-reqs %s\nn-v2-ns-reqs %s\n",
since,
data_v3 ? data_v3 : "", data_v2 ? data_v2 : "") < 0)
goto done;
Modified: tor/trunk/src/or/main.c
===================================================================
--- tor/trunk/src/or/main.c 2008-06-10 19:51:48 UTC (rev 15105)
+++ tor/trunk/src/or/main.c 2008-06-10 20:11:59 UTC (rev 15106)
@@ -962,8 +962,9 @@
if (time_to_dump_geoip_stats < now) {
#define DUMP_GEOIP_STATS_INTERVAL (60*60);
+ if (time_to_dump_geoip_stats)
+ dump_geoip_stats();
time_to_dump_geoip_stats = now + DUMP_GEOIP_STATS_INTERVAL;
- dump_geoip_stats();
}
/** 2. Periodically, we consider getting a new directory, getting a
Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c 2008-06-10 19:51:48 UTC (rev 15105)
+++ tor/trunk/src/or/routerlist.c 2008-06-10 20:11:59 UTC (rev 15106)
@@ -911,7 +911,7 @@
share *= sl_last_exit_weight;
if (rs->is_possible_guard)
share *= sl_last_guard_weight;
- *v2_share_out = share / U64_TO_DBL(sl_last_total_weighted_bw);
+ *v3_share_out = share / U64_TO_DBL(sl_last_total_weighted_bw);
}
}
More information about the tor-commits
mailing list