diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-09-02 15:26:17 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-09-02 15:26:17 -0400 |
commit | f89323afdadadb8db7eb48f7cbe75c5f4384dae4 (patch) | |
tree | 55c2743f394ba155a99bbef1b5b6fcb675c930e3 /src/or/relay.h | |
parent | 9456da17db739aad78633ecb5c1d6c7e8890b0da (diff) | |
download | tor-f89323afdadadb8db7eb48f7cbe75c5f4384dae4.tar.gz tor-f89323afdadadb8db7eb48f7cbe75c5f4384dae4.zip |
Fix behavior of adding a cell to a blocked queue.
We frequently add cells to stream-blocked queues for valid reasons
that don't mean we need to block streams. The most obvious reason
is if the cell arrives over a circuit rather than from an edge: we
don't block circuits, no matter how full queues get. The next most
obvious reason is that we allow CONNECTED cells from a newly created
stream to get delivered just fine.
This patch changes the behavior so that we only iterate over the
streams on a circuit when the cell in question came from a stream,
and we only block the stream that generated the cell, so that other
streams can still get their CONNECTEDs in.
Diffstat (limited to 'src/or/relay.h')
-rw-r--r-- | src/or/relay.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/relay.h b/src/or/relay.h index 73855a52bf..088ef3228a 100644 --- a/src/or/relay.h +++ b/src/or/relay.h @@ -45,7 +45,8 @@ void cell_queue_append(cell_queue_t *queue, packed_cell_t *cell); void cell_queue_append_packed_copy(cell_queue_t *queue, const cell_t *cell); void append_cell_to_circuit_queue(circuit_t *circ, or_connection_t *orconn, - cell_t *cell, cell_direction_t direction); + cell_t *cell, cell_direction_t direction, + uint16_t fromstream); void connection_or_unlink_all_active_circs(or_connection_t *conn); int connection_or_flush_from_first_active_circuit(or_connection_t *conn, int max, time_t now); |