diff options
author | Roger Dingledine <arma@torproject.org> | 2016-06-12 16:14:15 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2016-06-12 16:14:15 -0400 |
commit | 0616fd6fb6db5385eac6b432892c90fbb38f8666 (patch) | |
tree | df001b9573521a3561d23da5ce20eaf407e8e0e0 | |
parent | 80f2c3555d70261fb62d24f7fb2e9199cf377777 (diff) | |
download | tor-0616fd6fb6db5385eac6b432892c90fbb38f8666.tar.gz tor-0616fd6fb6db5385eac6b432892c90fbb38f8666.zip |
typo/comment/log fixes i found in my sandbox from montreal
-rw-r--r-- | src/or/directory.c | 6 | ||||
-rw-r--r-- | src/or/rendcache.c | 12 | ||||
-rw-r--r-- | src/or/routerlist.c | 1 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index abac19db2f..6caca11737 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -727,6 +727,10 @@ directory_initiate_command_routerstatus_rend(const routerstatus_t *status, node = node_get_by_id(status->identity_digest); + /* XXX The below check is wrong: !node means it's not in the consensus, + * but we haven't checked if we have a descriptor for it -- and also, + * we only care about the descriptor if it's a begindir-style anonymized + * connection. */ if (!node && anonymized_connection) { log_info(LD_DIR, "Not sending anonymized request to directory '%s'; we " "don't have its router descriptor.", @@ -744,7 +748,7 @@ directory_initiate_command_routerstatus_rend(const routerstatus_t *status, return; } - /* At this point, if we are a clients making a direct connection to a + /* At this point, if we are a client making a direct connection to a * directory server, we have selected a server that has at least one address * allowed by ClientUseIPv4/6 and Reachable{"",OR,Dir}Addresses. This * selection uses the preference in ClientPreferIPv6{OR,Dir}Port, if diff --git a/src/or/rendcache.c b/src/or/rendcache.c index f8206cd53b..e61a96b677 100644 --- a/src/or/rendcache.c +++ b/src/or/rendcache.c @@ -956,25 +956,25 @@ rend_cache_store_v2_desc_as_client(const char *desc, * avoid an evil HSDir serving old descriptor. We validate if the * timestamp is greater than and not equal because it's a rounded down * timestamp to the hour so if the descriptor changed in the same hour, - * the rend cache failure will tells us if we have a new descriptor. */ + * the rend cache failure will tell us if we have a new descriptor. */ if (e && e->parsed->timestamp > parsed->timestamp) { log_info(LD_REND, "We already have a new enough service descriptor for " "service ID %s with the same desc ID and version.", safe_str_client(service_id)); goto okay; } - /* Lookup our failure cache for intro point that might be unsuable. */ + /* Lookup our failure cache for intro point that might be unusable. */ validate_intro_point_failure(parsed, service_id); - /* It's now possible that our intro point list is empty, this means that + /* It's now possible that our intro point list is empty, which means that * this descriptor is useless to us because intro points have all failed * somehow before. Discard the descriptor. */ if (smartlist_len(parsed->intro_nodes) == 0) { - log_info(LD_REND, "Service descriptor with service ID %s, every " - "intro points are unusable. Discarding it.", + log_info(LD_REND, "Service descriptor with service ID %s has no " + "usable intro points. Discarding it.", safe_str_client(service_id)); goto err; } - /* Now either purge the current one and replace it's content or create a + /* Now either purge the current one and replace its content or create a * new one and add it to the rend cache. */ if (!e) { e = tor_malloc_zero(sizeof(rend_cache_entry_t)); diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 02564e6662..46492c571f 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -322,7 +322,6 @@ already_have_cert(authority_cert_t *cert) * we've just successfully retrieved certificates from, so try it first to * fetch any missing certificates. */ - int trusted_dirs_load_certs_from_string(const char *contents, int source, int flush, const char *source_dir) |