diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-02-05 21:39:46 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-02-05 21:39:46 +0000 |
commit | cf6fe27616603d9b7839cb91dbdb71fa0a766a44 (patch) | |
tree | 19d7ca1af1893b4a415b16d5b6450fae476c3432 | |
parent | 92aaf68d199f66e414bc57e428b6a2533687f68a (diff) | |
download | tor-cf6fe27616603d9b7839cb91dbdb71fa0a766a44.tar.gz tor-cf6fe27616603d9b7839cb91dbdb71fa0a766a44.zip |
r17915@catbus: nickm | 2008-02-05 16:28:57 -0500
Remove a dead function.
svn:r13389
-rw-r--r-- | src/or/connection_or.c | 15 | ||||
-rw-r--r-- | src/or/or.h | 1 | ||||
-rw-r--r-- | src/or/relay.c | 24 |
3 files changed, 7 insertions, 33 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 037d71364d..806beb6205 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -587,12 +587,12 @@ connection_or_tls_renegotiated_cb(tor_tls_t *tls, void *_conn) (void)tls; if (connection_tls_finish_handshake(conn) < 0) { - /* XXXX020 double-check that it's ok to do this from inside read. */ + /* XXXX_TLS double-check that it's ok to do this from inside read. */ connection_mark_for_close(TO_CONN(conn)); } #if 0 - /* XXXX020 this happens later, right? */ + /* XXXX_TLS this happens later, right? */ connection_or_init_conn_from_address(conn, conn->_base.addr, conn->_base.port, id_digest, 0); #endif @@ -1010,14 +1010,9 @@ connection_or_send_destroy(uint16_t circ_id, or_connection_t *conn, int reason) cell.payload[0] = (uint8_t) reason; log_debug(LD_OR,"Sending destroy (circID %d).", circ_id); -#if 0 - /* XXXX020 Actually, don't kill the cell queue: it may have data that we're - * waiting to flush. We need to do something more sensible here. */ - /* Clear the cell queue on the circuit, so that our destroy cell will - * be the very next thing written.*/ - circ = circuit_get_by_circid_orconn(circ_id, conn); - circuit_clear_cell_queue(circ, conn); -#endif + /* XXXX It's possible that under some circumstances, we want the destroy + * to take precedence over other data waiting on the circuit's cell queue. + */ connection_or_write_cell_to_buf(&cell, conn); return 0; diff --git a/src/or/or.h b/src/or/or.h index eca2c8da64..fe12779433 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3519,7 +3519,6 @@ int connection_or_flush_from_first_active_circuit(or_connection_t *conn, void assert_active_circuits_ok(or_connection_t *orconn); void make_circuit_inactive_on_conn(circuit_t *circ, or_connection_t *conn); void make_circuit_active_on_conn(circuit_t *circ, or_connection_t *conn); -void circuit_clear_cell_queue(circuit_t *circ, or_connection_t *orconn); /********************************* rephist.c ***************************/ diff --git a/src/or/relay.c b/src/or/relay.c index d7d33f8741..006c22fe14 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -1516,7 +1516,8 @@ circuit_consider_sending_sendme(circuit_t *circ, crypt_path_t *layer_hint) static int total_cells_allocated = 0; #ifdef ENABLE_CELL_POOL /* Defined in ./configure. True by default. */ -/* XXX020 make cell pools the only option once we know they work? -RD */ +/* XXX020 make cell pools the only option once we know they work and improve + * matters? -RD */ static mp_pool_t *cell_pool = NULL; /** Allocate structures to hold cells. */ void @@ -1921,27 +1922,6 @@ append_cell_to_circuit_queue(circuit_t *circ, or_connection_t *orconn, } } -/** Remove all the cells queued on <b>circ</b> for <b>orconn</b>. */ -void -circuit_clear_cell_queue(circuit_t *circ, or_connection_t *orconn) -{ - cell_queue_t *queue; - // int streams_blocked; // XXXX020 use this for something, or remove it. - if (circ->n_conn == orconn) { - queue = &circ->n_conn_cells; - // streams_blocked = circ->streams_blocked_on_n_conn; - } else { - or_circuit_t *orcirc = TO_OR_CIRCUIT(circ); - queue = &orcirc->p_conn_cells; - // streams_blocked = circ->streams_blocked_on_p_conn; - } - - if (queue->n) - make_circuit_inactive_on_conn(circ,orconn); - - cell_queue_clear(queue); -} - /** Fail with an assert if the active circuits ring on <b>orconn</b> is * corrupt. */ void |