[or-cvs] make my assumption explicit
Roger Dingledine
arma at seul.org
Tue Apr 27 11:28:48 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:
make my assumption explicit
Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.224
retrieving revision 1.225
diff -u -d -r1.224 -r1.225
--- circuit.c 27 Apr 2004 11:23:56 -0000 1.224
+++ circuit.c 27 Apr 2004 11:28:45 -0000 1.225
@@ -1235,6 +1235,9 @@
!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);
+ /* (only general and purpose_c circs can get dirty) */
+ tor_assert(!circ->n_streams);
+ tor_assert(circ->purpose <= CIRCUIT_PURPOSE_C_REND_JOINED);
circuit_mark_for_close(circ);
} else if (!circ->timestamp_dirty && CIRCUIT_IS_ORIGIN(circ) &&
circ->state == CIRCUIT_STATE_OPEN &&
More information about the tor-commits
mailing list