Loading src/or/circuitlist.c +0 −5 Original line number Diff line number Diff line Loading @@ -1249,11 +1249,6 @@ assert_circuit_ok(const circuit_t *c) tor_assert(c == c2); } } #if 0 /* false now that rendezvous exits are attached to p_streams */ if (origin_circ) for (conn = origin_circ->p_streams; conn; conn = conn->next_stream) tor_assert(conn->_base.type == CONN_TYPE_AP); #endif if (or_circ) for (conn = or_circ->n_streams; conn; conn = conn->next_stream) tor_assert(conn->_base.type == CONN_TYPE_EXIT); Loading src/or/main.c +0 −8 Original line number Diff line number Diff line Loading @@ -1296,14 +1296,6 @@ second_elapsed_callback(int fd, short event, void *args) current_second = now; /* remember which second it is, for next time */ #if 0 if (current_second % 300 == 0) { rep_history_clean(current_second - options->RephistTrackTime); dumpmemusage(get_min_log_level()<LOG_INFO ? get_min_log_level() : LOG_INFO); } #endif if (event_add(timeout_event, &one_second)) log_err(LD_NET, "Error from libevent when setting one-second timeout event"); Loading src/or/or.h +0 −13 Original line number Diff line number Diff line Loading @@ -2766,19 +2766,6 @@ typedef struct { * the bridge authority guess which countries have blocked access to us. */ int BridgeRecordUsageByCountry; #if 0 /** If true, and Tor is built with DIRREQ_STATS support, and we're a * directory, record how many directory requests we get from each country. */ int DirRecordUsageByCountry; /** Round all GeoIP results to the next multiple of this value, to avoid * leaking information. */ int DirRecordUsageGranularity; /** Time interval: purge geoip stats after this long. */ int DirRecordUsageRetainIPs; /** Time interval: Flush geoip data to disk this often. */ int DirRecordUsageSaveInterval; #endif /** Optionally, a file with GeoIP data. */ char *GeoIPFile; Loading src/or/routerlist.c +0 −63 Original line number Diff line number Diff line Loading @@ -2422,46 +2422,6 @@ dump_routerlist_mem_usage(int severity) "In %d old descriptors: "U64_FORMAT" bytes.", smartlist_len(routerlist->routers), U64_PRINTF_ARG(livedescs), smartlist_len(routerlist->old_routers), U64_PRINTF_ARG(olddescs)); #if 0 { const smartlist_t *networkstatus_v2_list = networkstatus_get_v2_list(); networkstatus_t *consensus = networkstatus_get_latest_consensus(); log(severity, LD_DIR, "Now let's look through old_descriptors!"); SMARTLIST_FOREACH(routerlist->old_routers, signed_descriptor_t *, sd, { int in_v2 = 0; int in_v3 = 0; char published[ISO_TIME_LEN+1]; char last_valid_until[ISO_TIME_LEN+1]; char last_served_at[ISO_TIME_LEN+1]; char id[HEX_DIGEST_LEN+1]; routerstatus_t *rs; format_iso_time(published, sd->published_on); format_iso_time(last_valid_until, sd->last_listed_as_valid_until); format_iso_time(last_served_at, sd->last_served_at); base16_encode(id, sizeof(id), sd->identity_digest, DIGEST_LEN); SMARTLIST_FOREACH(networkstatus_v2_list, networkstatus_v2_t *, ns, { rs = networkstatus_v2_find_entry(ns, sd->identity_digest); if (rs && !memcmp(rs->descriptor_digest, sd->signed_descriptor_digest, DIGEST_LEN)) { in_v2 = 1; break; } }); if (consensus) { rs = networkstatus_vote_find_entry(consensus, sd->identity_digest); if (rs && !memcmp(rs->descriptor_digest, sd->signed_descriptor_digest, DIGEST_LEN)) in_v3 = 1; } log(severity, LD_DIR, "Old descriptor for %s (published %s) %sin v2 ns, %sin v3 " "consensus. Last valid until %s; last served at %s.", id, published, in_v2 ? "" : "not ", in_v3 ? "" : "not ", last_valid_until, last_served_at); }); } #endif } /** Debugging helper: If <b>idx</b> is nonnegative, assert that <b>ri</b> is Loading Loading @@ -5253,29 +5213,6 @@ routerset_equal(const routerset_t *old, const routerset_t *new) }); return 1; #if 0 /* XXXX: This won't work if the names/digests are identical but in a different order. Checking for exact equality would be heavy going, is it worth it? -RH*/ /* This code is totally bogus; sizeof doesn't work even remotely like this * code seems to think. Let's revert to a string-based comparison for * now. -NM*/ if (sizeof(old->names) != sizeof(new->names)) return 0; if (memcmp(old->names,new->names,sizeof(new->names))) return 0; if (sizeof(old->digests) != sizeof(new->digests)) return 0; if (memcmp(old->digests,new->digests,sizeof(new->digests))) return 0; if (sizeof(old->countries) != sizeof(new->countries)) return 0; if (memcmp(old->countries,new->countries,sizeof(new->countries))) return 0; return 1; #endif } /** Free all storage held in <b>routerset</b>. */ Loading Loading
src/or/circuitlist.c +0 −5 Original line number Diff line number Diff line Loading @@ -1249,11 +1249,6 @@ assert_circuit_ok(const circuit_t *c) tor_assert(c == c2); } } #if 0 /* false now that rendezvous exits are attached to p_streams */ if (origin_circ) for (conn = origin_circ->p_streams; conn; conn = conn->next_stream) tor_assert(conn->_base.type == CONN_TYPE_AP); #endif if (or_circ) for (conn = or_circ->n_streams; conn; conn = conn->next_stream) tor_assert(conn->_base.type == CONN_TYPE_EXIT); Loading
src/or/main.c +0 −8 Original line number Diff line number Diff line Loading @@ -1296,14 +1296,6 @@ second_elapsed_callback(int fd, short event, void *args) current_second = now; /* remember which second it is, for next time */ #if 0 if (current_second % 300 == 0) { rep_history_clean(current_second - options->RephistTrackTime); dumpmemusage(get_min_log_level()<LOG_INFO ? get_min_log_level() : LOG_INFO); } #endif if (event_add(timeout_event, &one_second)) log_err(LD_NET, "Error from libevent when setting one-second timeout event"); Loading
src/or/or.h +0 −13 Original line number Diff line number Diff line Loading @@ -2766,19 +2766,6 @@ typedef struct { * the bridge authority guess which countries have blocked access to us. */ int BridgeRecordUsageByCountry; #if 0 /** If true, and Tor is built with DIRREQ_STATS support, and we're a * directory, record how many directory requests we get from each country. */ int DirRecordUsageByCountry; /** Round all GeoIP results to the next multiple of this value, to avoid * leaking information. */ int DirRecordUsageGranularity; /** Time interval: purge geoip stats after this long. */ int DirRecordUsageRetainIPs; /** Time interval: Flush geoip data to disk this often. */ int DirRecordUsageSaveInterval; #endif /** Optionally, a file with GeoIP data. */ char *GeoIPFile; Loading
src/or/routerlist.c +0 −63 Original line number Diff line number Diff line Loading @@ -2422,46 +2422,6 @@ dump_routerlist_mem_usage(int severity) "In %d old descriptors: "U64_FORMAT" bytes.", smartlist_len(routerlist->routers), U64_PRINTF_ARG(livedescs), smartlist_len(routerlist->old_routers), U64_PRINTF_ARG(olddescs)); #if 0 { const smartlist_t *networkstatus_v2_list = networkstatus_get_v2_list(); networkstatus_t *consensus = networkstatus_get_latest_consensus(); log(severity, LD_DIR, "Now let's look through old_descriptors!"); SMARTLIST_FOREACH(routerlist->old_routers, signed_descriptor_t *, sd, { int in_v2 = 0; int in_v3 = 0; char published[ISO_TIME_LEN+1]; char last_valid_until[ISO_TIME_LEN+1]; char last_served_at[ISO_TIME_LEN+1]; char id[HEX_DIGEST_LEN+1]; routerstatus_t *rs; format_iso_time(published, sd->published_on); format_iso_time(last_valid_until, sd->last_listed_as_valid_until); format_iso_time(last_served_at, sd->last_served_at); base16_encode(id, sizeof(id), sd->identity_digest, DIGEST_LEN); SMARTLIST_FOREACH(networkstatus_v2_list, networkstatus_v2_t *, ns, { rs = networkstatus_v2_find_entry(ns, sd->identity_digest); if (rs && !memcmp(rs->descriptor_digest, sd->signed_descriptor_digest, DIGEST_LEN)) { in_v2 = 1; break; } }); if (consensus) { rs = networkstatus_vote_find_entry(consensus, sd->identity_digest); if (rs && !memcmp(rs->descriptor_digest, sd->signed_descriptor_digest, DIGEST_LEN)) in_v3 = 1; } log(severity, LD_DIR, "Old descriptor for %s (published %s) %sin v2 ns, %sin v3 " "consensus. Last valid until %s; last served at %s.", id, published, in_v2 ? "" : "not ", in_v3 ? "" : "not ", last_valid_until, last_served_at); }); } #endif } /** Debugging helper: If <b>idx</b> is nonnegative, assert that <b>ri</b> is Loading Loading @@ -5253,29 +5213,6 @@ routerset_equal(const routerset_t *old, const routerset_t *new) }); return 1; #if 0 /* XXXX: This won't work if the names/digests are identical but in a different order. Checking for exact equality would be heavy going, is it worth it? -RH*/ /* This code is totally bogus; sizeof doesn't work even remotely like this * code seems to think. Let's revert to a string-based comparison for * now. -NM*/ if (sizeof(old->names) != sizeof(new->names)) return 0; if (memcmp(old->names,new->names,sizeof(new->names))) return 0; if (sizeof(old->digests) != sizeof(new->digests)) return 0; if (memcmp(old->digests,new->digests,sizeof(new->digests))) return 0; if (sizeof(old->countries) != sizeof(new->countries)) return 0; if (memcmp(old->countries,new->countries,sizeof(new->countries))) return 0; return 1; #endif } /** Free all storage held in <b>routerset</b>. */ Loading