[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r16401: Remove dead code that was left from marking HiddenService(Ex (tor/trunk/src/or)



Author: kloesing
Date: 2008-08-04 18:42:27 -0400 (Mon, 04 Aug 2008)
New Revision: 16401

Modified:
   tor/trunk/src/or/rendservice.c
Log:
Remove dead code that was left from marking HiddenService(Exclude)Nodes obsolete in task 754.

Modified: tor/trunk/src/or/rendservice.c
===================================================================
--- tor/trunk/src/or/rendservice.c	2008-08-04 22:16:19 UTC (rev 16400)
+++ tor/trunk/src/or/rendservice.c	2008-08-04 22:42:27 UTC (rev 16401)
@@ -1199,12 +1199,11 @@
   rend_service_t *service;
   rend_intro_point_t *intro;
   int changed, prev_intro_nodes;
-  smartlist_t *intro_routers, *exclude_routers;
+  smartlist_t *intro_routers;
   time_t now;
   or_options_t *options = get_options();
 
   intro_routers = smartlist_create();
-  exclude_routers = smartlist_create();
   now = time(NULL);
 
   for (i=0; i < smartlist_len(rend_service_list); ++i) {
@@ -1272,13 +1271,12 @@
     /* Remember how many introduction circuits we started with. */
     prev_intro_nodes = smartlist_len(service->intro_nodes);
 
-    smartlist_add_all(exclude_routers, intro_routers);
     /* The directory is now here. Pick three ORs as intro points. */
     for (j=prev_intro_nodes; j < NUM_INTRO_POINTS; ++j) {
       router_crn_flags_t flags = CRN_NEED_UPTIME;
       if (get_options()->_AllowInvalid & ALLOW_INVALID_INTRODUCTION)
         flags |= CRN_ALLOW_INVALID;
-      router = router_choose_random_node(NULL, exclude_routers,
+      router = router_choose_random_node(NULL, intro_routers,
                                          options->ExcludeNodes, flags);
       if (!router) {
         log_warn(LD_REND,
@@ -1288,7 +1286,6 @@
       }
       changed = 1;
       smartlist_add(intro_routers, router);
-      smartlist_add(exclude_routers, router);
       intro = tor_malloc_zero(sizeof(rend_intro_point_t));
       intro->extend_info = extend_info_from_router(router);
       if (service->descriptor_version == 2) {
@@ -1300,9 +1297,6 @@
                router->nickname, service->service_id);
     }
 
-    /* Reset exclude_routers, for the next time around the loop. */
-    smartlist_clear(exclude_routers);
-
     /* If there's no need to launch new circuits, stop here. */
     if (!changed)
       continue;
@@ -1318,7 +1312,6 @@
     }
   }
   smartlist_free(intro_routers);
-  smartlist_free(exclude_routers);
 }
 
 /** Regenerate and upload rendezvous service descriptors for all