[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] when counting how many being-built circs will handle a stre...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] when counting how many being-built circs will handle a stre...
- From: arma@seul.org (Roger Dingledine)
- Date: Wed, 7 Apr 2004 15:14:35 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Wed, 07 Apr 2004 15:14:51 -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:
when counting how many being-built circs will handle a stream,
don't count ones that are too old
Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -d -r1.188 -r1.189
--- circuit.c 6 Apr 2004 21:52:01 -0000 1.188
+++ circuit.c 7 Apr 2004 19:14:33 -0000 1.189
@@ -459,10 +459,13 @@
circuit_t *circ;
routerinfo_t *exitrouter;
int num=0;
+ time_t now = time(NULL);
for(circ=global_circuitlist;circ;circ = circ->next) {
if(circ->cpath && circ->state != CIRCUIT_STATE_OPEN &&
- !circ->marked_for_close && circ->purpose == CIRCUIT_PURPOSE_C_GENERAL) {
+ !circ->marked_for_close && circ->purpose == CIRCUIT_PURPOSE_C_GENERAL &&
+ (!circ->timestamp_dirty ||
+ circ->timestamp_dirty + options.NewCircuitPeriod < now)) {
exitrouter = router_get_by_nickname(circ->build_state->chosen_exit);
if(exitrouter && connection_ap_can_use_exit(conn, exitrouter) != ADDR_POLICY_REJECTED)
if(++num >= MIN_CIRCUITS_HANDLING_STREAM)