[or-cvs] r11855: let bridge authorities write bridge descriptors to their cac (tor/trunk/src/or)

arma at seul.org arma at seul.org
Wed Oct 10 23:11:53 UTC 2007


Author: arma
Date: 2007-10-10 19:11:53 -0400 (Wed, 10 Oct 2007)
New Revision: 11855

Modified:
   tor/trunk/src/or/dirserv.c
   tor/trunk/src/or/routerlist.c
Log:
let bridge authorities write bridge descriptors to their
cached-descriptors* files.

nick, did i get this right?


Modified: tor/trunk/src/or/dirserv.c
===================================================================
--- tor/trunk/src/or/dirserv.c	2007-10-10 22:59:34 UTC (rev 11854)
+++ tor/trunk/src/or/dirserv.c	2007-10-10 23:11:53 UTC (rev 11855)
@@ -557,18 +557,6 @@
                                      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 @@
     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;

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2007-10-10 22:59:34 UTC (rev 11854)
+++ tor/trunk/src/or/routerlist.c	2007-10-10 23:11:53 UTC (rev 11855)
@@ -2988,8 +2988,6 @@
     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 @@
       }
     }
 
-    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);



More information about the tor-commits mailing list