From: Andrea Shepard Date: Sat, 15 Jun 2013 09:27:23 +0000 (-0700) Subject: Merge branch 'bug9072-024' into bug9072-025 X-Git-Tag: tor-0.2.5.1-alpha~146 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=469bd7a3cfbe6c5ca5c2602a10ee1854714e93c5;p=thirdparty%2Ftor.git Merge branch 'bug9072-024' into bug9072-025 --- 469bd7a3cfbe6c5ca5c2602a10ee1854714e93c5 diff --cc src/or/relay.c index 58ca4e957c,0f21663bcd..38776bcd9a --- a/src/or/relay.c +++ b/src/or/relay.c @@@ -58,7 -58,6 +58,9 @@@ static void adjust_exit_policy_from_exi entry_connection_t *conn, node_t *node, const tor_addr_t *addr); ++#if 0 +static int get_max_middle_cells(void); ++#endif /** Stop reading on edge connections when we have this many cells * waiting on the appropriate queue. */ @@@ -2473,18 -2459,6 +2475,20 @@@ channel_flush_from_first_active_circuit return n_flushed; } ++#if 0 +/** Indicate the current preferred cap for middle circuits; zero disables + * the cap. Right now it's just a constant, ORCIRC_MAX_MIDDLE_CELLS, but + * the logic in append_cell_to_circuit_queue() is written to be correct + * if we want to base it on a consensus param or something that might change + * in the future. + */ +static int +get_max_middle_cells(void) +{ + return ORCIRC_MAX_MIDDLE_CELLS; +} ++#endif + /** Add cell to the queue of circ writing to chan * transmitting in direction. */ void @@@ -2495,7 -2469,6 +2499,9 @@@ append_cell_to_circuit_queue(circuit_t or_circuit_t *orcirc = NULL; cell_queue_t *queue; int streams_blocked; ++#if 0 + uint32_t tgt_max_middle_cells, p_len, n_len, tmp, hard_max_middle_cells; ++#endif if (circ->marked_for_close) return; @@@ -2585,8 -2509,9 +2595,9 @@@ } } } + #endif - cell_queue_append_packed_copy(queue, cell, chan->wide_circ_ids); + cell_queue_append_packed_copy(queue, cell, chan->wide_circ_ids, 1); /* If we have too many cells on the circuit, we should stop reading from * the edge streams for a while. */