[or-cvs] r13092: Make bridge geoip data get rounded up, not down. (in tor/trunk: . doc src/or)

nickm at seul.org nickm at seul.org
Thu Jan 10 17:48:33 UTC 2008


Author: nickm
Date: 2008-01-10 12:48:32 -0500 (Thu, 10 Jan 2008)
New Revision: 13092

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/doc/TODO
   tor/trunk/src/or/geoip.c
Log:
 r17552 at catbus:  nickm | 2008-01-10 12:13:43 -0500
 Make bridge geoip data get rounded up, not down.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r17552] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-01-10 17:08:05 UTC (rev 13091)
+++ tor/trunk/ChangeLog	2008-01-10 17:48:32 UTC (rev 13092)
@@ -39,6 +39,7 @@
       on 0.2.0.15-alpha.
     - Do not try to download missing certificates until we have tried
       to check our fallback consensus.  Fixes bug 583.
+    - Make bridges round geoip info up, not down.
 
   o Minor features (controller):
     - Get NS events working again.  (Patch from tup)

Modified: tor/trunk/doc/TODO
===================================================================
--- tor/trunk/doc/TODO	2008-01-10 17:08:05 UTC (rev 13091)
+++ tor/trunk/doc/TODO	2008-01-10 17:48:32 UTC (rev 13092)
@@ -40,7 +40,7 @@
     - Mention in control-spec.txt
     D have normal relays report geoip stats too.
     D different thresholds for bridges than for normal relays.
-N   - bridge relays round geoip stats *up*, not down.
+    o bridge relays round geoip stats *up*, not down.
 R - bridge communities
     . spec
     . deploy

Modified: tor/trunk/src/or/geoip.c
===================================================================
--- tor/trunk/src/or/geoip.c	2008-01-10 17:08:05 UTC (rev 13091)
+++ tor/trunk/src/or/geoip.c	2008-01-10 17:48:32 UTC (rev 13092)
@@ -354,6 +354,8 @@
       c_hist_t *ent;
       /* Only report a country if it has a minimum number of IPs. */
       if (c >= MIN_IPS_TO_NOTE_COUNTRY) {
+        /* Round up to the next multiple of IP_GRANULARITY */
+        c += IP_GRANULARITY-1;
         c -= c % IP_GRANULARITY;
         countrycode = geoip_get_country_name(i);
         ent = tor_malloc(sizeof(c_hist_t));



More information about the tor-commits mailing list