minor fixes that have been accumulating

svn:r14378
This commit is contained in:
Roger Dingledine 2008-04-16 00:12:44 +00:00
parent 2b4ff1718f
commit 5e299b5e01
7 changed files with 10 additions and 8 deletions

View File

@ -22,7 +22,8 @@ descriptor at every 'extend' operation:
- Client picks middle hop out of networkstatus, asks guard for
its descriptor, then extends to it.
- Clients picks exit hop out of networkstatus, asks middle hop
for its descriptor, the extends to it. Done.
for its descriptor, then extends to it. Done.
The client needs to ask for the descriptor even if it already has a
copy, because otherwise we leak too much. Also, the descriptor needs to
be padded to some large (but not too large) size to prevent the middle

View File

@ -83,7 +83,7 @@ circuit_is_acceptable(circuit_t *circ, edge_connection_t *conn,
if (purpose == CIRCUIT_PURPOSE_C_GENERAL) {
if (!exitrouter && !build_state->onehop_tunnel) {
log_debug(LD_CIRC,"Not considering circuit with unknown router.");
log_debug(LD_CIRC,"Not considering circuit with unknown router.");
return 0; /* this circuit is screwed and doesn't know it yet,
* or is a rendezvous circuit. */
}

View File

@ -1968,7 +1968,7 @@ connection_read_to_buf(connection_t *conn, int *max_to_read)
case TOR_TLS_CLOSE:
case TOR_TLS_ERROR_IO:
log_debug(LD_NET,"TLS connection closed %son read. Closing. "
"(Nickname %s, address %s",
"(Nickname %s, address %s)",
result == TOR_TLS_CLOSE ? "cleanly " : "",
or_conn->nickname ? or_conn->nickname : "not set",
conn->address);

View File

@ -65,7 +65,7 @@ geoip_add_entry(uint32_t low, uint32_t high, const char *country)
}
/** Add an entry to the GeoIP table, parsing it from <b>line</b>. The
* format is as for geoip_load_file. */
* format is as for geoip_load_file(). */
/*private*/ int
geoip_parse_entry(const char *line)
{
@ -283,7 +283,7 @@ geoip_remove_old_clients(time_t cutoff)
/** Do not report any geoip data at all if we have fewer than this number of
* IPs to report about. */
#define MIN_IPS_TO_NOTE_ANYTHING 16
/** When reporting geoip data about countries, round down to the nearest
/** When reporting geoip data about countries, round up to the nearest
* multiple of this value. */
#define IP_GRANULARITY 8

View File

@ -1706,7 +1706,7 @@ routers_update_status_from_consensus_networkstatus(smartlist_t *routers,
router_clear_status_flags(router);
}
}) {
/* We have a routersatus for this router. */
/* We have a routerstatus for this router. */
const char *digest = router->cache_info.identity_digest;
ds = router_get_trusteddirserver_by_digest(digest);

View File

@ -312,7 +312,7 @@ rep_hist_note_router_unreachable(const char *id, time_t when)
started_tracking_stability = time(NULL);
if (hist && hist->start_of_run) {
/*XXXX We could treat failed connections differently from failed
* conect attempts. */
* connect attempts. */
long run_length = when - hist->start_of_run;
hist->weighted_run_length += run_length;
hist->total_run_weights += 1.0;
@ -1484,7 +1484,7 @@ rep_hist_get_predicted_ports(time_t now)
}
/** The user asked us to do a resolve. Rather than keeping track of
* timings and such of resolves, we fake it for now by making treating
* timings and such of resolves, we fake it for now by treating
* it the same way as a connection to port 80. This way we will continue
* to have circuits lying around if the user only uses Tor for resolves.
*/

View File

@ -3103,6 +3103,7 @@ routerlist_remove_old_routers(void)
* pruning current routers that are too old and that nobody recommends. (If
* we don't have enough networkstatuses, then we should get more before we
* decide to kill routers.) */
/* XXX021 we don't check if we have a v3 consensus, do we? should we? -RD */
if (!caches ||
smartlist_len(networkstatus_v2_list) > get_n_v2_authorities() / 2) {
cutoff = now - ROUTER_MAX_AGE;