char *
geoip_format_bridge_stats(time_t now)
{
- char *out = NULL, *data = NULL, *ipver = NULL;
+ char *out = NULL, *country_data = NULL, *ipver_data = NULL;
long duration = now - start_of_bridge_stats_interval;
char written[ISO_TIME_LEN+1];
return NULL; /* Not initialized. */
format_iso_time(written, now);
- geoip_get_client_history(GEOIP_CLIENT_CONNECT, &data, &ipver);
+ geoip_get_client_history(GEOIP_CLIENT_CONNECT, &country_data, &ipver_data);
tor_asprintf(&out,
"bridge-stats-end %s (%ld s)\n"
"bridge-ips %s\n"
"bridge-ip-versions %s\n",
written, duration,
- data ? data : "",
- ipver ? ipver : "");
- tor_free(data);
- tor_free(ipver);
+ country_data ? country_data : "",
+ ipver_data ? ipver_data : "");
+ tor_free(country_data);
+ tor_free(ipver_data);
return out;
}
* the bridge authority guess which countries have blocked access to us. */
int BridgeRecordUsageByCountry;
- /** Optionally, IPv4 and IPv6 GeoIP data */
+ /** Optionally, IPv4 and IPv6 GeoIP data. */
char *GeoIPFile;
char *GeoIPv6File;
if (!cc_list)
return 0;
- /* XXX: ipv4 specific */
+ /* XXXXipv6 */
tor_addr_from_ipv4h(&tar, addr);
country = geoip_get_country_by_addr(&tar);
name = geoip_get_country_name(country);