summaryrefslogtreecommitdiff
path: root/src/or/networkstatus.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-12-26 17:35:08 +0000
committerNick Mathewson <nickm@torproject.org>2008-12-26 17:35:08 +0000
commitdf5e8f65bcc1ed3353c45a80baab126476aa5011 (patch)
tree142809c03246a9f40c8813313f1ade11466dfe05 /src/or/networkstatus.c
parent41aef35963efb37b85ac7ea1d24b3bd1dea936cb (diff)
downloadtor-df5e8f65bcc1ed3353c45a80baab126476aa5011.tar.gz
tor-df5e8f65bcc1ed3353c45a80baab126476aa5011.zip
Add more missing documentation, and correct an error in container.c documentation: Don't introduce two parameters called n when you're calling an algorithm O(n).
svn:r17783
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r--src/or/networkstatus.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index d7a2520278..d7fc8dc903 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -710,12 +710,12 @@ router_set_networkstatus_v2(const char *s, time_t arrived_at,
if (!found)
smartlist_add(networkstatus_v2_list, ns);
-/*XXXX021 magic. */
-/*DOCDOC */
-#define V2_NETWORKSTATUS_LIFETIME (3*60*60)
+/** Retain any routerinfo mentioned in a V2 networkstatus for at least this
+ * long. */
+#define V2_NETWORKSTATUS_ROUTER_LIFETIME (3*60*60)
{
- time_t live_until = ns->published_on + V2_NETWORKSTATUS_LIFETIME;
+ time_t live_until = ns->published_on + V2_NETWORKSTATUS_ROUTER_LIFETIME;
SMARTLIST_FOREACH(ns->entries, routerstatus_t *, rs,
{
signed_descriptor_t *sd =
@@ -1755,7 +1755,7 @@ routers_update_status_from_consensus_networkstatus(smartlist_t *routers,
/* Now update last_listed_as_valid_until from v2 networkstatuses. */
/* XXXX If this is slow, we need to rethink the code. */
SMARTLIST_FOREACH(networkstatus_v2_list, networkstatus_v2_t *, ns, {
- time_t live_until = ns->published_on + V2_NETWORKSTATUS_LIFETIME;
+ time_t live_until = ns->published_on + V2_NETWORKSTATUS_ROUTER_LIFETIME;
SMARTLIST_FOREACH_JOIN(ns->entries, routerstatus_t *, rs,
routers, routerinfo_t *, ri,
memcmp(rs->identity_digest,