summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-04-13 01:15:06 +0000
committerNick Mathewson <nickm@torproject.org>2004-04-13 01:15:06 +0000
commit9cd163f6ffdf90bc4e7c26a9e55dc0bd5b8b90b8 (patch)
treec7fac6efde25689ecd4af06e9784e332d6c78ba2
parent88950f4ac2a2a01a3c02520aeafeecbd59f030a1 (diff)
downloadtor-9cd163f6ffdf90bc4e7c26a9e55dc0bd5b8b90b8.tar.gz
tor-9cd163f6ffdf90bc4e7c26a9e55dc0bd5b8b90b8.zip
Have find_intro_circuit return non-open circs
svn:r1600
-rw-r--r--src/or/rendservice.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index c186309708..793d6d44cb 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;
}
}