[or-cvs] it was the second bug that was nailing us.

Roger Dingledine arma at seul.org
Tue Apr 27 11:23:58 UTC 2004


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:
it was the second bug that was nailing us.
periodically we expire some circuits if we already have
enough, and we were counting rend circs in that number.

(the first one wasn't a bug after all)


Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.223
retrieving revision 1.224
diff -u -d -r1.223 -r1.224
--- circuit.c	27 Apr 2004 10:16:31 -0000	1.223
+++ circuit.c	27 Apr 2004 11:23:56 -0000	1.224
@@ -1232,10 +1232,9 @@
     if (circ->timestamp_dirty &&
         circ->timestamp_dirty + options.NewCircuitPeriod < now &&
         !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));
+        !circ->p_streams /* nothing attached */ ) {
+      log_fn(LOG_DEBUG,"Closing n_circ_id %d (dirty %d secs ago, purp %d)",circ->n_circ_id,
+             (int)(now - circ->timestamp_dirty), circ->purpose);
       circuit_mark_for_close(circ);
     } else if (!circ->timestamp_dirty && CIRCUIT_IS_ORIGIN(circ) &&
                circ->state == CIRCUIT_STATE_OPEN &&
@@ -1250,6 +1249,8 @@
   }
   for (i = MAX_UNUSED_OPEN_CIRCUITS; i < smartlist_len(unused_open_circs); ++i) {
     circuit_t *circ = smartlist_get(unused_open_circs, i);
+    log_fn(LOG_DEBUG,"Expiring excess clean circ (n_circ_id %d, purp %d)",
+           circ->n_circ_id, circ->purpose);
     circuit_mark_for_close(circ);
   }
   smartlist_free(unused_open_circs);



More information about the tor-commits mailing list