diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-09 18:22:17 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-09 18:22:17 +0000 |
commit | cd753df7bf741f5063d672afaf23390ebbd55c48 (patch) | |
tree | 9434a2526b72f8d577f87a3991a14827e705217b /src/or/dirserv.c | |
parent | b9605745566610dddf51be3c1b4018961d0ab3ca (diff) | |
download | tor-cd753df7bf741f5063d672afaf23390ebbd55c48.tar.gz tor-cd753df7bf741f5063d672afaf23390ebbd55c48.zip |
Resolve many XXXs and all DOCDOCs
svn:r2755
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 8e3cc5f796..9a11f0bdb9 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -119,6 +119,14 @@ dirserv_parse_fingerprint_file(const char *fname) nickname, fingerprint); continue; } + if (0==strcasecmp(ent->nickname, DEFAULT_CLIENT_NICKNAME)) { + /* If you approved an OR called "client", then clients who use + * the default nickname could all be rejected. That's no good. */ + log(LOG_WARN, + "Authorizing a nickname '%s' would break many clients; skipping.", + DEFAULT_CLIENT_NICKNAME); + continue; + } for (i = 0; i < smartlist_len(fingerprint_list_new); ++i) { ent = smartlist_get(fingerprint_list_new, i); if (0==strcasecmp(ent->nickname, nickname)) { @@ -388,8 +396,7 @@ dirserv_add_descriptor(const char **desc) ent->desc_len = desc_len; ent->descriptor = tor_strndup(start,desc_len); ent->router = ri; - /* XXX008 is ent->verified useful/used for anything? */ - ent->verified = verified; /* XXXX008 support other possibilities. */ + ent->verified = verified; smartlist_add(descriptor_list, ent); *desc = end; @@ -692,7 +699,9 @@ static char *cached_directory_z = NULL; static size_t cached_directory_z_len = 0; static time_t cached_directory_published = 0; -/** DOCDOC */ +/** If we have no cached directory, or it is older than <b>when</b>, then + * replace it with <b>directory</b>, published at <b>when</b>. + */ void dirserv_set_cached_directory(const char *directory, time_t when) { time_t now; |