aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-04-11 22:28:51 +0000
committerRoger Dingledine <arma@torproject.org>2003-04-11 22:28:51 +0000
commit7df5caad0df1644770316d98a289be734029f4c5 (patch)
treef8dc04e15194d60fb0255e606f6d09a8035620d8 /src/or
parent1d53d8ad0e119818fc1a2ad481e50b416f068f5d (diff)
downloadtor-7df5caad0df1644770316d98a289be734029f4c5.tar
tor-7df5caad0df1644770316d98a289be734029f4c5.tar.gz
make it work (heh)
svn:r231
Diffstat (limited to 'src/or')
-rw-r--r--src/or/connection_edge.c9
-rw-r--r--src/or/or.h2
2 files changed, 8 insertions, 3 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index acae44e61..4f0a25b99 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -106,7 +106,12 @@ int connection_edge_process_data_cell(cell_t *cell, circuit_t *circ, int edge_ty
circuit_consider_sending_sendme(circ, edge_type);
- for(conn = circ->p_conn; conn && conn->topic_id != topic_id; conn = conn->next_topic) ;
+ if(edge_type == EDGE_AP)
+ conn = circ->p_conn;
+ else
+ conn = circ->n_conn;
+
+ for( ; conn && conn->topic_id != topic_id; conn = conn->next_topic) ;
/* now conn is either NULL, in which case we don't recognize the topic_id, or
* it is set, in which case cell is talking about this conn.
@@ -247,7 +252,7 @@ int connection_edge_finished_flushing(connection_t *conn) {
if(connection_wants_to_flush(conn)) /* in case there are any queued data cells */
connection_start_writing(conn);
return
- connection_exit_send_connected(conn) || /* deliver a 'connected' data cell back through the circuit. */
+ connection_edge_send_command(conn, circuit_get_by_conn(conn), TOPIC_COMMAND_CONNECTED) || /* deliver a 'connected' data cell back through the circuit. */
connection_process_inbuf(conn); /* in case the server has written anything */
case AP_CONN_STATE_OPEN:
case EXIT_CONN_STATE_OPEN:
diff --git a/src/or/or.h b/src/or/or.h
index df7d4085c..67606aae5 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -624,7 +624,7 @@ int connection_ap_handle_listener_read(connection_t *conn);
/********************************* connection_edge.c ***************************/
int connection_edge_process_inbuf(connection_t *conn);
-int connection_edge_send_command(connection_t *conn, int topic_command);
+int connection_edge_send_command(connection_t *conn, circuit_t *circ, int topic_command);
int connection_edge_process_data_cell(cell_t *cell, circuit_t *circ, int edge_type);
int connection_edge_finished_flushing(connection_t *conn);