summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-10-04 16:21:58 +0000
committerNick Mathewson <nickm@torproject.org>2007-10-04 16:21:58 +0000
commit6f7847b378a67ad29cdeb9a3c1304de474bf46c0 (patch)
tree8f7b10020d50f6a3175a7c9e076da649c357641f /src/or/directory.c
parentcc7e0f62b512f4b9446ba3ef2cdb702ee14ad82f (diff)
downloadtor-6f7847b378a67ad29cdeb9a3c1304de474bf46c0.tar.gz
tor-6f7847b378a67ad29cdeb9a3c1304de474bf46c0.zip
r15530@catbus: nickm | 2007-10-04 12:16:27 -0400
Add a bunch of function documentation; clean up a little code; fix some XXXXs; tag the nonsensical EXTRAINFO_PURPOSE_GENERAL as nonsesnse; note another bit of "do not cache special routers" code to nuke. svn:r11761
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index da565b2ff0..c9fe224bcc 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -1066,7 +1066,12 @@ body_is_plausible(const char *body, size_t len, int purpose)
}
}
-/** DOCDOC */
+/** Called when we've just fetched a bunch of router descriptors in
+ * <b>body</b>. The list <b>which</b>, if present, holds digests for
+ * descriptors we requested: descriptor digests if <b>descriptor_digests</b>
+ * is true, or identity digests otherwise. Parse the descriptors, validate
+ * them, and annotate them as having purpose <b>purpose</b> and as having been
+ * downloaded from <b>source</b>. */
static void
load_downloaded_routers(const char *body, smartlist_t *which,
int descriptor_digests,
@@ -1077,6 +1082,7 @@ load_downloaded_routers(const char *body, smartlist_t *which,
char time_buf[ISO_TIME_LEN+1];
int general = router_purpose == ROUTER_PURPOSE_GENERAL;
format_iso_time(time_buf, time(NULL));
+ tor_assert(source);
if (tor_snprintf(buf, sizeof(buf),
"@downloaded-at %s\n"