diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-04-13 01:15:06 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-04-13 01:15:06 +0000 |
commit | 9cd163f6ffdf90bc4e7c26a9e55dc0bd5b8b90b8 (patch) | |
tree | c7fac6efde25689ecd4af06e9784e332d6c78ba2 /src/or | |
parent | 88950f4ac2a2a01a3c02520aeafeecbd59f030a1 (diff) | |
download | tor-9cd163f6ffdf90bc4e7c26a9e55dc0bd5b8b90b8.tar tor-9cd163f6ffdf90bc4e7c26a9e55dc0bd5b8b90b8.tar.gz |
Have find_intro_circuit return non-open circs
svn:r1600
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/rendservice.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index c18630970..793d6d44c 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -623,9 +623,9 @@ rend_service_rendezvous_is_ready(circuit_t *circuit) * Manage introduction points ******/ -/* Return the introduction circuit ending at 'router' for the service - * whose public key is 'pk_digest'. Return NULL if no such service is - * found. +/* Return the (possibly non-open) introduction circuit ending at + * 'router' for the service whose public key is 'pk_digest'. Return + * NULL if no such service is found. */ static circuit_t * find_intro_circuit(routerinfo_t *router, const char *pk_digest) @@ -635,8 +635,8 @@ find_intro_circuit(routerinfo_t *router, const char *pk_digest) while ((circ = circuit_get_next_by_pk_and_purpose(circ,pk_digest, CIRCUIT_PURPOSE_S_INTRO))) { assert(circ->cpath); - if (circ->cpath->prev->addr == router->addr && - circ->cpath->prev->port == router->or_port) { + if (circ->build_state->chosen_exit && + !strcasecmp(circ->build_state->chosen_exit, router->nickname)) { return circ; } } @@ -645,8 +645,8 @@ find_intro_circuit(routerinfo_t *router, const char *pk_digest) while ((circ = circuit_get_next_by_pk_and_purpose(circ,pk_digest, CIRCUIT_PURPOSE_S_ESTABLISH_INTRO))) { assert(circ->cpath); - if (circ->cpath->prev->addr == router->addr && - circ->cpath->prev->port == router->or_port) { + if (circ->build_state->chosen_exit && + !strcasecmp(circ->build_state->chosen_exit, router->nickname)) { return circ; } } |