|
@@ -348,8 +348,10 @@ geoip_get_client_history(time_t now)
|
|
|
++total;
|
|
|
}
|
|
|
|
|
|
+#if (MIN_IPS_TO_NOTE_ANYTHING > 0)
|
|
|
if (total < MIN_IPS_TO_NOTE_ANYTHING)
|
|
|
goto done;
|
|
|
+#endif
|
|
|
|
|
|
entries = smartlist_create();
|
|
|
for (i = 0; i < n_countries; ++i) {
|
|
@@ -357,7 +359,11 @@ geoip_get_client_history(time_t now)
|
|
|
const char *countrycode;
|
|
|
c_hist_t *ent;
|
|
|
|
|
|
+#if (MIN_IPS_TO_NOTE_COUNTRY > 0)
|
|
|
if (c >= MIN_IPS_TO_NOTE_COUNTRY) {
|
|
|
+#else
|
|
|
+ if (1) {
|
|
|
+#endif
|
|
|
|
|
|
c += IP_GRANULARITY-1;
|
|
|
c -= c % IP_GRANULARITY;
|
|
@@ -379,7 +385,9 @@ geoip_get_client_history(time_t now)
|
|
|
smartlist_add(chunks, tor_strdup(buf));
|
|
|
});
|
|
|
result = smartlist_join_strings(chunks, ",", 0, NULL);
|
|
|
+#if (MIN_IPS_TO_NOTE_ANYTHING > 0)
|
|
|
done:
|
|
|
+#endif
|
|
|
tor_free(counts);
|
|
|
if (chunks) {
|
|
|
SMARTLIST_FOREACH(chunks, char *, c, tor_free(c));
|