return NULL;
}
+#if defined(ENABLE_TOR2WEB_MODE) || defined(TOR_UNIT_TESTS)
/* The config option Tor2webRendezvousPoints has been set and we need
* to pick an RP out of that set. Make sure that the RP we choose is
* alive, and return it. Return NULL if no usable RP could be found in
return rp_node;
}
+#endif
/* Pick a Rendezvous Point for our HS circuits according to <b>flags</b>. */
static const node_t *
if (options->AllowInvalid_ & ALLOW_INVALID_RENDEZVOUS)
flags |= CRN_ALLOW_INVALID;
+#ifdef ENABLE_TOR2WEB_MODE
/* The user wants us to pick specific RPs. */
if (options->Tor2webRendezvousPoints) {
const node_t *tor2web_rp = pick_tor2web_rendezvous_node(flags, options);
}
/* Else, if no tor2web RP was found, fall back to choosing a random node */
}
+#endif
return router_choose_random_node(NULL, options->ExcludeNodes, flags);
}