[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Change some comments to reflect the multitude of GeoIP databases.



commit ffddd4de2a69a896be3886b8f48a218a70babbcc
Author: Linus Nordberg <linus@xxxxxxxxxxxxxx>
Date:   Wed Oct 31 16:38:07 2012 +0100

    Change some comments to reflect the multitude of GeoIP databases.
---
 src/or/geoip.c      |   12 ++++++------
 src/or/routerlist.c |    2 +-
 src/or/routerset.c  |    2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/or/geoip.c b/src/or/geoip.c
index 606bece..9aba3c9 100644
--- a/src/or/geoip.c
+++ b/src/or/geoip.c
@@ -21,7 +21,7 @@
 static void clear_geoip_db(void);
 static void init_geoip_countries(void);
 
-/** An entry from the GeoIP file: maps an IP range to a country. */
+/** An entry from the GeoIP IPv4 file: maps an IPv4 range to a country. */
 typedef struct geoip_ipv4_entry_t {
   uint32_t ip_low; /**< The lowest IP in the range, in host order */
   uint32_t ip_high; /**< The highest IP in the range, in host order */
@@ -56,9 +56,9 @@ static smartlist_t *geoip_ipv4_entries = NULL, *geoip_ipv6_entries = NULL;
 static char geoip_digest[DIGEST_LEN];
 static char geoip6_digest[DIGEST_LEN];
 
-/** Return the index of the <b>country</b>'s entry in the GeoIP DB
- * if it is a valid 2-letter country code, otherwise return -1.
- */
+/** Return the index of the <b>country</b>'s entry in the GeoIP
+ * country list if it is a valid 2-letter country code, otherwise
+ * return -1. */
 country_t
 geoip_get_country(const char *country)
 {
@@ -408,7 +408,7 @@ geoip_get_country_by_addr(const tor_addr_t *addr)
   }
 }
 
-/** Return the number of countries recognized by the GeoIP database. */
+/** Return the number of countries recognized by the GeoIP country list. */
 int
 geoip_get_n_countries(void)
 {
@@ -1641,7 +1641,7 @@ getinfo_helper_geoip(control_connection_t *control_conn,
   return 0;
 }
 
-/** Release all storage held by the GeoIP database. */
+/** Release all storage held by the GeoIP databases and country list. */
 static void
 clear_geoip_db(void)
 {
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 5327622..9537331 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -4790,7 +4790,7 @@ routers_sort_by_identity(smartlist_t *routers)
   smartlist_sort(routers, _compare_routerinfo_by_id_digest);
 }
 
-/** Called when we change a node set, or when we reload the geoip list:
+/** Called when we change a node set, or when we reload the geoip IPv4 list:
  * recompute all country info in all configuration node sets and in the
  * routerlist. */
 void
diff --git a/src/or/routerset.c b/src/or/routerset.c
index f9e3c9a..8a5ff21 100644
--- a/src/or/routerset.c
+++ b/src/or/routerset.c
@@ -74,7 +74,7 @@ routerset_get_countryname(const char *c)
 }
 
 /** Update the routerset's <b>countries</b> bitarray_t. Called whenever
- * the GeoIP database is reloaded.
+ * the GeoIP IPv4 database is reloaded.
  */
 void
 routerset_refresh_countries(routerset_t *target)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits