aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-07-21 03:16:24 +0000
committerRoger Dingledine <arma@torproject.org>2004-07-21 03:16:24 +0000
commitddb6eb35afcd66e96011d9cba937a0fcde88d2d5 (patch)
tree84bd8c122aa505760ade2f0fff21036f5c84cafe /src/or/circuituse.c
parent30d6b1479b5485c7e8cc3d10353ba115110ac81a (diff)
downloadtor-ddb6eb35afcd66e96011d9cba937a0fcde88d2d5.tar
tor-ddb6eb35afcd66e96011d9cba937a0fcde88d2d5.tar.gz
we were counting incorrectly when trying to figure out whether
a given AP stream was being handled or not. (how did this work?) svn:r2077
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 9627b271b..e81005fd8 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -82,7 +82,7 @@ static int circuit_is_acceptable(circuit_t *circ,
if (!strncmp(exitrouter->platform, "Tor 0.0.7", 9))
return 0;
} else if(purpose == CIRCUIT_PURPOSE_C_GENERAL) {
- if(connection_ap_can_use_exit(conn, exitrouter) == ADDR_POLICY_REJECTED) {
+ if(!connection_ap_can_use_exit(conn, exitrouter)) {
/* can't exit from this router */
return 0;
}
@@ -268,7 +268,7 @@ int circuit_stream_is_being_handled(connection_t *conn) {
(!circ->timestamp_dirty ||
circ->timestamp_dirty + options.NewCircuitPeriod < now)) {
exitrouter = router_get_by_digest(circ->build_state->chosen_exit_digest);
- if(exitrouter && connection_ap_can_use_exit(conn, exitrouter) != ADDR_POLICY_REJECTED)
+ if(exitrouter && connection_ap_can_use_exit(conn, exitrouter))
if(++num >= MIN_CIRCUITS_HANDLING_STREAM)
return 1;
}