diff options
author | Roger Dingledine <arma@torproject.org> | 2003-02-06 08:00:49 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-02-06 08:00:49 +0000 |
commit | ceafe12ed67528ce4dd656f43bccb7c7a9f7317f (patch) | |
tree | 8f95a57e7fc71d62c919057fedb25dad33fcc424 /src/or/connection.c | |
parent | c35373a2cfae66d41e4120469096acde10cea050 (diff) | |
download | tor-ceafe12ed67528ce4dd656f43bccb7c7a9f7317f.tar tor-ceafe12ed67528ce4dd656f43bccb7c7a9f7317f.tar.gz |
make reusing circuits work (and be the default)
performance is better, but not by much. not sure why yet.
svn:r153
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index f7965cdd2..7b4ad843b 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -622,7 +622,7 @@ repeat_connection_package_raw_inbuf: cell.length += TOPIC_HEADER_SIZE; cell.command = CELL_DATA; - if(circ->n_conn == conn) { /* send it backward. we're an exit. */ + if(conn->type == CONN_TYPE_EXIT) { cell.aci = circ->p_aci; if(circuit_deliver_data_cell_from_edge(&cell, circ, EDGE_EXIT) < 0) { log(LOG_DEBUG,"connection_package_raw_inbuf(): circuit_deliver_data_cell_from_edge (backward) failed. Closing."); @@ -637,6 +637,7 @@ repeat_connection_package_raw_inbuf: } log(LOG_DEBUG,"connection_package_raw_inbuf(): receive_topicwindow at exit is %d",conn->n_receive_topicwindow); } else { /* send it forward. we're an AP */ + assert(conn->type == CONN_TYPE_AP); cell.aci = circ->n_aci; if(circuit_deliver_data_cell_from_edge(&cell, circ, EDGE_AP) < 0) { log(LOG_DEBUG,"connection_package_raw_inbuf(): circuit_deliver_data_cell_from_edge (forward) failed. Closing."); |