summaryrefslogtreecommitdiff
path: root/src/or/rendservice.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-07-24 09:22:34 +0000
committerNick Mathewson <nickm@torproject.org>2008-07-24 09:22:34 +0000
commited781e69716248111ef1a2ddc1b9add671bd8d16 (patch)
treeb9ef93b7f1394413f78803d8626151e7cb3745bb /src/or/rendservice.c
parentdff1ef7d06d1f7e540be2b10e66538ab7eac3f76 (diff)
downloadtor-ed781e69716248111ef1a2ddc1b9add671bd8d16.tar.gz
tor-ed781e69716248111ef1a2ddc1b9add671bd8d16.zip
r17338@aud-055: nickm | 2008-07-24 11:21:06 +0200
Refactor the router_choose_random_node interface: any function with 10 parameters, most of which are boolean and one of which is unused, should get refactored like this. svn:r16167
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r--src/or/rendservice.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index f20ed99f4a..c745a0eb4f 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -1275,10 +1275,11 @@ rend_services_introduce(void)
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 = router_choose_random_node(NULL, NULL, exclude_routers,
- options->ExcludeNodes, 1, 0, 0,
- get_options()->_AllowInvalid & ALLOW_INVALID_INTRODUCTION,
- 0, 0);
+ 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,
+ options->ExcludeNodes, flags);
if (!router) {
log_warn(LD_REND,
"Could only establish %d introduction points for %s.",