mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
let bridge authorities write bridge descriptors to their
cached-descriptors* files. nick, did i get this right? svn:r11855
This commit is contained in:
parent
919f421c6c
commit
dd920354c2
@ -557,18 +557,6 @@ dirserv_add_multiple_descriptors(const char *desc, uint8_t purpose,
|
||||
annotation_buf)) {
|
||||
SMARTLIST_FOREACH(list, routerinfo_t *, ri, {
|
||||
msg_out = NULL;
|
||||
|
||||
/* Assign the purpose.
|
||||
*
|
||||
* XXX020 Perhaps this should get pushed into
|
||||
* router_parse_list_from_string()? Also, tie it somehow into
|
||||
* router_load_single_router()? Lastly, does extrainfo_t want
|
||||
* a purpose field too, or can we just piggyback off the one
|
||||
* in routerinfo_t? */
|
||||
tor_assert(ri->purpose == purpose);
|
||||
if (purpose != ROUTER_PURPOSE_GENERAL) /*XXXXX020 wrong. */
|
||||
ri->cache_info.do_not_cache = 1;
|
||||
|
||||
r_tmp = dirserv_add_descriptor(ri, &msg_out);
|
||||
if (r_tmp < r) {
|
||||
r = r_tmp;
|
||||
@ -585,10 +573,6 @@ dirserv_add_multiple_descriptors(const char *desc, uint8_t purpose,
|
||||
SMARTLIST_FOREACH(list, extrainfo_t *, ei, {
|
||||
msg_out = NULL;
|
||||
|
||||
/* XXX020 see above note on purpose fields */
|
||||
if (purpose != ROUTER_PURPOSE_GENERAL)
|
||||
ei->cache_info.do_not_cache = 1;
|
||||
|
||||
r_tmp = dirserv_add_extrainfo(ei, &msg_out);
|
||||
if (r_tmp < r) {
|
||||
r = r_tmp;
|
||||
|
@ -2988,8 +2988,6 @@ router_load_single_router(const char *s, uint8_t purpose, const char **msg)
|
||||
return -1;
|
||||
}
|
||||
tor_assert(ri->purpose == purpose);
|
||||
if (ri->purpose != ROUTER_PURPOSE_GENERAL)
|
||||
ri->cache_info.do_not_cache = 1;
|
||||
if (router_is_me(ri)) {
|
||||
log_warn(LD_DIR, "Router's identity key matches mine; dropping.");
|
||||
*msg = "Router's identity key matches mine.";
|
||||
@ -3071,9 +3069,6 @@ router_load_routers_from_string(const char *s, const char *eos,
|
||||
}
|
||||
}
|
||||
|
||||
if (ri->purpose != ROUTER_PURPOSE_GENERAL) /* XXXX020 wrong. */
|
||||
ri->cache_info.do_not_cache = 1;
|
||||
|
||||
if (router_add_to_routerlist(ri, &msg, from_cache, !from_cache) >= 0) {
|
||||
smartlist_add(changed, ri);
|
||||
routerlist_descriptors_added(changed);
|
||||
|
Loading…
Reference in New Issue
Block a user