diff options
author | Roger Dingledine <arma@torproject.org> | 2003-09-14 08:17:14 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-09-14 08:17:14 +0000 |
commit | ebc23f690c38e70bfe1eb6aaa56a5c4eb9e35be4 (patch) | |
tree | eb5b8c810fdabfbcb1be4d0576bbe31484e63b79 /src/or/connection_edge.c | |
parent | b63013e8470a2d44036d8157344484c2f4d8c6cd (diff) | |
download | tor-ebc23f690c38e70bfe1eb6aaa56a5c4eb9e35be4.tar tor-ebc23f690c38e70bfe1eb6aaa56a5c4eb9e35be4.tar.gz |
bugfix: onion pending queue now works
and fixed recent memory leak
svn:r456
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 7560a61a7..7a461a697 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -102,13 +102,13 @@ int connection_edge_send_command(connection_t *fromconn, circuit_t *circ, int re return 0; } +/* an incoming relay cell has arrived. return -1 if you want to tear down the + * circuit, else 0. */ int connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ, connection_t *conn, int edge_type, crypt_path_t *layer_hint) { int relay_command; static int num_seen=0; - /* an incoming relay cell has arrived */ - assert(cell && circ); relay_command = CELL_RELAY_COMMAND(*cell); @@ -148,7 +148,7 @@ int connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ, connection if((edge_type == EDGE_AP && --layer_hint->deliver_window < 0) || (edge_type == EDGE_EXIT && --circ->deliver_window < 0)) { log_fn(LOG_DEBUG,"circ deliver_window below 0. Killing."); - return -1; /* XXX kill the whole circ? */ + return -1; } log_fn(LOG_DEBUG,"circ deliver_window now %d.", edge_type == EDGE_AP ? layer_hint->deliver_window : circ->deliver_window); @@ -165,6 +165,7 @@ int connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ, connection return -1; /* somebody's breaking protocol. kill the whole circuit. */ } +// printf("New text for buf (%d bytes): '%s'", cell->length - RELAY_HEADER_SIZE, cell->payload + RELAY_HEADER_SIZE); if(connection_write_to_buf(cell->payload + RELAY_HEADER_SIZE, cell->length - RELAY_HEADER_SIZE, conn) < 0) { conn->marked_for_close = 1; |