aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-12-04 05:55:40 +0000
committerNick Mathewson <nickm@torproject.org>2006-12-04 05:55:40 +0000
commita91c12f2e7adfb179f5a8034c1ed1265b8fe8a74 (patch)
tree39f70a5f2b05376ad88bffc026a148626f330280 /src/or/circuituse.c
parentf90cd5bfc0267afd61da2414fa9cc2605ca997b4 (diff)
downloadtor-a91c12f2e7adfb179f5a8034c1ed1265b8fe8a74.tar.gz
tor-a91c12f2e7adfb179f5a8034c1ed1265b8fe8a74.zip
r9855@Kushana: nickm | 2006-12-04 00:55:09 -0500
Merge circuit_about_to_close_connection and connection_about_to_close_connection. svn:r9021
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 84b642fbe4..bc7d08736a 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -518,50 +518,6 @@ circuit_detach_stream(circuit_t *circ, edge_connection_t *conn)
tor_assert(0); /* should never get here */
}
-/** Notify the global circuit list that <b>conn</b> is about to be
- * removed and then freed.
- *
- * If it's an OR conn, then mark-for-close all the circuits that use
- * that conn.
- *
- * If it's an edge conn, then detach it from its circ, so we don't
- * try to reference it later.
- */
-void
-circuit_about_to_close_connection(connection_t *conn)
-{
- /* currently, we assume it's too late to flush conn's buf here.
- * down the road, maybe we'll consider that eof doesn't mean can't-write
- */
- switch (conn->type) {
- case CONN_TYPE_OR: {
- if (!connection_state_is_open(conn)) {
- /* Inform any pending (not attached) circs that they should
- * give up. */
- circuit_n_conn_done(TO_OR_CONN(conn), 0);
- }
- /* Now close all the attached circuits on it. */
- circuit_unlink_all_from_or_conn(TO_OR_CONN(conn),
- END_CIRC_REASON_OR_CONN_CLOSED);
- return;
- }
- case CONN_TYPE_AP:
- case CONN_TYPE_EXIT: {
- circuit_t *circ;
- /* It's an edge conn. Need to remove it from the linked list of
- * conn's for this circuit. Confirm that 'end' relay command has
- * been sent. But don't kill the circuit.
- */
-
- circ = circuit_get_by_edge_conn(TO_EDGE_CONN(conn));
- if (!circ)
- return;
-
- circuit_detach_stream(circ, TO_EDGE_CONN(conn));
- }
- } /* end switch */
-}
-
/** Find each circuit that has been unused for too long, or dirty
* for too long and has no streax=ms on it: mark it for close.
*/