[or-cvs] Have find_intro_circuit return non-open circs
Nick Mathewson
nickm at seul.org
Tue Apr 13 01:15:08 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv8591/src/or
Modified Files:
rendservice.c
Log Message:
Have find_intro_circuit return non-open circs
Index: rendservice.c
===================================================================
RCS file: /home/or/cvsroot/src/or/rendservice.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- rendservice.c 12 Apr 2004 05:12:50 -0000 1.46
+++ rendservice.c 13 Apr 2004 01:15:06 -0000 1.47
@@ -623,9 +623,9 @@
* 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 @@
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 @@
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;
}
}
More information about the tor-commits
mailing list