From 4453e3794a4630f7da8cde0a0aebaad628986a67 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 6 Apr 2005 06:13:49 +0000 Subject: Add a pointer from edge connections to their corresponding circuit (ulp!); add some debugging sanity-checking for cirid_orconn_map stuff svn:r4024 --- src/or/circuituse.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/or/circuituse.c') diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 756baea85..bfaafdbe8 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -417,6 +417,7 @@ void circuit_detach_stream(circuit_t *circ, connection_t *conn) { tor_assert(conn); conn->cpath_layer = NULL; /* make sure we don't keep a stale pointer */ + conn->on_circuit = NULL; if (conn == circ->p_streams) { circ->p_streams = conn->next_stream; @@ -923,6 +924,7 @@ static void link_apconn_to_circ(connection_t *apconn, circuit_t *circ) { log_fn(LOG_DEBUG,"attaching new conn to circ. n_circ_id %d.", circ->n_circ_id); apconn->timestamp_lastread = time(NULL); /* reset it, so we can measure circ timeouts */ apconn->next_stream = circ->p_streams; + apconn->on_circuit = circ; /* assert_connection_ok(conn, time(NULL)); */ circ->p_streams = apconn; -- cgit v1.2.3