[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] don"t expire joined-rend circs that have an exit connection...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] don"t expire joined-rend circs that have an exit connection...
- From: arma@seul.org (Roger Dingledine)
- Date: Tue, 27 Apr 2004 06:16:33 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Tue, 27 Apr 2004 06:17:02 -0400
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
circuit.c
Log Message:
don't expire joined-rend circs that have an exit connection attached
and don't expire non-general excess circuits
Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.222
retrieving revision 1.223
diff -u -d -r1.222 -r1.223
--- circuit.c 26 Apr 2004 18:09:49 -0000 1.222
+++ circuit.c 27 Apr 2004 10:16:31 -0000 1.223
@@ -1231,13 +1231,16 @@
*/
if (circ->timestamp_dirty &&
circ->timestamp_dirty + options.NewCircuitPeriod < now &&
- !circ->p_conn &&
- !circ->p_streams) {
- log_fn(LOG_DEBUG,"Closing n_circ_id %d",circ->n_circ_id);
+ !circ->p_conn && /* we're the origin */
+ !circ->p_streams && /* AP connections */
+ !circ->n_streams /* exit connections */ ) {
+ log_fn(LOG_DEBUG,"Closing n_circ_id %d (dirty %d secs ago)",circ->n_circ_id,
+ (int)(now - circ->timestamp_dirty));
circuit_mark_for_close(circ);
} else if (!circ->timestamp_dirty && CIRCUIT_IS_ORIGIN(circ) &&
- circ->state == CIRCUIT_STATE_OPEN) {
- /* Also, gather a list of open unused circuits that we created.
+ circ->state == CIRCUIT_STATE_OPEN &&
+ circ->purpose == CIRCUIT_PURPOSE_C_GENERAL) {
+ /* Also, gather a list of open unused general circuits that we created.
* Because we add elements to the front of global_circuitlist,
* the last elements of unused_open_circs will be the oldest
* ones.