summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2009-01-06 21:28:48 +0000
committerRoger Dingledine <arma@torproject.org>2009-01-06 21:28:48 +0000
commitb36a98ff5a03b316ba781486faabf31ab83b15fa (patch)
tree2860113d4c83dcae0850adc79dccc584ebe724e5 /src
parent462f64b6b993d46f5b61c7e2333cc526d15ba884 (diff)
downloadtor-b36a98ff5a03b316ba781486faabf31ab83b15fa.tar.gz
tor-b36a98ff5a03b316ba781486faabf31ab83b15fa.zip
When our circuit fails at the first hop (e.g. we get a destroy
cell back), avoid using that OR connection anymore, and also tell all the one-hop directory requests waiting for it that they should fail. Bugfix on 0.2.1.3-alpha. svn:r17984
Diffstat (limited to 'src')
-rw-r--r--src/or/circuituse.c2
-rw-r--r--src/or/or.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index e6feb2250d..84aae1768c 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -802,7 +802,7 @@ circuit_build_failed(origin_circuit_t *circ)
/* We failed at the first hop. If there's an OR connection
to blame, blame it. */
or_connection_t *n_conn = NULL;
- const char *n_conn_id = NULL;
+ const char *n_conn_id = circ->_base.n_hop->identity_digest;
if (circ->_base.n_conn) {
n_conn = circ->_base.n_conn;
if (n_conn) n_conn_id = n_conn->identity_digest;
diff --git a/src/or/or.h b/src/or/or.h
index de1db89390..438424d97e 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -391,7 +391,7 @@ typedef enum {
#define EXIT_PURPOSE_RESOLVE 2
#define _EXIT_PURPOSE_MAX 2
-/* !!!! If any connection purpose is ever over over 31, we must grow the type
+/* !!!! If any connection purpose is ever over 31, we must grow the type
* field in connection_t. */
/** Circuit state: I'm the origin, still haven't done all my handshakes. */