[or-cvs] bugfix: only close old circuits if they have no connections!
Roger Dingledine
arma at seul.org
Fri Apr 18 18:47:52 UTC 2003
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home/arma/work/onion/cvs/src/or
Modified Files:
circuit.c main.c
Log Message:
bugfix: only close old circuits if they have no connections!
Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- circuit.c 17 Apr 2003 17:10:40 -0000 1.35
+++ circuit.c 18 Apr 2003 18:47:49 -0000 1.36
@@ -630,7 +630,7 @@
while(circ) {
tmpcirc = circ;
circ = circ->next;
- if(tmpcirc != youngest && (!tmpcirc->p_conn || tmpcirc->p_conn->type == CONN_TYPE_AP)) {
+ if(tmpcirc != youngest && !tmpcirc->p_conn) {
log(LOG_DEBUG,"circuit_expire_unused_circuits(): Closing n_aci %d",tmpcirc->n_aci);
circuit_close(tmpcirc);
}
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- main.c 16 Apr 2003 17:04:58 -0000 1.49
+++ main.c 18 Apr 2003 18:47:49 -0000 1.50
@@ -327,7 +327,7 @@
circuit_launch_new(-1); /* tell it to forget about previous failures */
circ = circuit_get_newest_by_edge_type(EDGE_AP);
if(!circ || circ->dirty) {
- log(LOG_INFO,"prepare_for_poll(): Youngest circuit missing or dirty; launching replacement.");
+ log(LOG_INFO,"prepare_for_poll(): Youngest circuit %s; launching replacement.", circ ? "dirty" : "missing");
circuit_launch_new(0); /* make an onion and lay the circuit */
}
time_to_new_circuit = now.tv_sec + options.NewCircuitPeriod;
More information about the tor-commits
mailing list