summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-04-15 00:03:48 +0000
committerRoger Dingledine <arma@torproject.org>2004-04-15 00:03:48 +0000
commitac38746b3b2f0230695808ce715614e64ef1f7c2 (patch)
tree12c68a001a64a19338145a25242ccddd33560652
parentb51561f7fb826ce145277875311070715e99b099 (diff)
downloadtor-ac38746b3b2f0230695808ce715614e64ef1f7c2.tar.gz
tor-ac38746b3b2f0230695808ce715614e64ef1f7c2.zip
narrow in closer
svn:r1627
-rw-r--r--src/or/connection_edge.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index d856340044..7f0ae432d2 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -1114,6 +1114,7 @@ static int connection_exit_begin_conn(cell_t *cell, circuit_t *circ) {
relay_header_t rh;
char *colon;
+ assert_circuit_ok(circ);
relay_header_unpack(&rh, cell->payload);
/* XXX currently we don't send an end cell back if we drop the
@@ -1155,6 +1156,7 @@ static int connection_exit_begin_conn(cell_t *cell, circuit_t *circ) {
/* add it into the linked list of streams on this circuit */
n_stream->next_stream = circ->n_streams;
circ->n_streams = n_stream;
+ assert_circuit_ok(circ);
if(circ->purpose == CIRCUIT_PURPOSE_S_REND_JOINED) {
log_fn(LOG_DEBUG,"begin is for rendezvous. configuring stream.");
@@ -1162,11 +1164,13 @@ static int connection_exit_begin_conn(cell_t *cell, circuit_t *circ) {
n_stream->state = EXIT_CONN_STATE_CONNECTING;
strcpy(n_stream->rend_query, circ->rend_query);
assert(n_stream->rend_query[0]);
+ assert_circuit_ok(circ);
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;
}
+ assert_circuit_ok(circ);
log_fn(LOG_DEBUG,"Finished assigning addr/port");
n_stream->cpath_layer = circ->cpath->prev; /* link it */
connection_exit_connect(n_stream);