summaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-05-31 17:00:37 -0400
committerNick Mathewson <nickm@torproject.org>2012-05-31 17:00:37 -0400
commit0cbe3ff313deb6ef7807b07f922a567e8e1274bd (patch)
tree4b3f4fd566a8aa12d51b276bd79d60d70fb45bcd /src/or/circuituse.c
parentdff73d26f3a6c9d7011ad98a6752129a37625a10 (diff)
parentb7e863c07305941d0c12b46da503fca694148abf (diff)
downloadtor-0cbe3ff313deb6ef7807b07f922a567e8e1274bd.tar.gz
tor-0cbe3ff313deb6ef7807b07f922a567e8e1274bd.zip
Merge remote-tracking branch 'origin/maint-0.2.2'
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index de0aa7da20..6f4202ea21 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -1412,7 +1412,13 @@ circuit_get_open_circ_or_launch(entry_connection_t *conn,
need_uptime = !conn->want_onehop && !conn->use_begindir &&
smartlist_string_num_isin(options->LongLivedPorts,
conn->socks_request->port);
- need_internal = desired_circuit_purpose != CIRCUIT_PURPOSE_C_GENERAL;
+
+ if (desired_circuit_purpose != CIRCUIT_PURPOSE_C_GENERAL)
+ need_internal = 1;
+ else if (conn->use_begindir || conn->want_onehop)
+ need_internal = 1;
+ else
+ need_internal = 0;
circ = circuit_get_best(conn, 1, desired_circuit_purpose,
need_uptime, need_internal);