[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] more debugging to hunt for a bug
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:
more debugging to hunt for a bug
Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.212
retrieving revision 1.213
diff -u -d -r1.212 -r1.213
--- circuit.c 16 Apr 2004 08:21:35 -0000 1.212
+++ circuit.c 17 Apr 2004 01:33:04 -0000 1.213
@@ -470,6 +470,20 @@
if(victim->timestamp_created + MIN_SECONDS_BEFORE_EXPIRING_CIRC > now)
continue; /* it's young still, don't mess with it */
+ /* some debug logs, to help track bugs */
+ if(victim->purpose >= CIRCUIT_PURPOSE_C_INTRODUCING &&
+ victim->purpose <= CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED) {
+ if(victim->timestamp_dirty)
+ log_fn(LOG_DEBUG,"Considering %sopen purp %d to %s (clean).",
+ victim->state == CIRCUIT_STATE_OPEN ? "" : "non",
+ victim->purpose, victim->build_state->chosen_exit);
+ else
+ log_fn(LOG_DEBUG,"Considering %sopen purp %d to %s. %d secs since dirty.",
+ victim->state == CIRCUIT_STATE_OPEN ? "" : "non",
+ victim->purpose, victim->build_state->chosen_exit,
+ (int)(now - victim->timestamp_dirty));
+ }
+
/* if circ is !open, or if it's open but purpose is a non-finished
* intro or rend, then mark it for close */
if(victim->state != CIRCUIT_STATE_OPEN ||