aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-04-09 17:51:57 +0000
committerNick Mathewson <nickm@torproject.org>2004-04-09 17:51:57 +0000
commite6964ed7e69bf81fe189402310c86c917d14fdd7 (patch)
tree74e0c907c46edd6566a51ee0747c805ba2da0de4
parentfacb5d4221e1d603e61613ec8610feb7a73d3c46 (diff)
downloadtor-e6964ed7e69bf81fe189402310c86c917d14fdd7.tar
tor-e6964ed7e69bf81fe189402310c86c917d14fdd7.tar.gz
set rend exit connection state _before_ calling rend_service_set_connection_addr_port and maybe eventually assert_connection_ok. This solves the other half of the bug weasel found.
svn:r1579
-rw-r--r--src/or/connection_edge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index f99da535c..e0cd9c85d 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -1134,13 +1134,13 @@ static int connection_exit_begin_conn(cell_t *cell, circuit_t *circ) {
if(circ->purpose == CIRCUIT_PURPOSE_S_REND_JOINED) {
n_stream->address = tor_strdup("(rendezvous)");
+ n_stream->state = EXIT_CONN_STATE_CONNECTING;
strcpy(n_stream->rend_query, circ->rend_query);
if(rend_service_set_connection_addr_port(n_stream, circ) < 0) {
log_fn(LOG_WARN,"Didn't find rendezvous service (port %d)",n_stream->port);
connection_mark_for_close(n_stream,0 /* XXX */);
return 0;
}
- n_stream->state = EXIT_CONN_STATE_CONNECTING;
n_stream->cpath_layer = circ->cpath->prev; /* link it */
connection_exit_connect(n_stream);
return 0;