summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-04-27 11:28:45 +0000
committerRoger Dingledine <arma@torproject.org>2004-04-27 11:28:45 +0000
commit9965bd8387cf2f7a838245d3999bb84af51fccf1 (patch)
tree6f37b4f76872c8875a0441cf71af90e775e4ec70
parent505bb2f4a01804c91603bde7544fb56a24deac15 (diff)
downloadtor-9965bd8387cf2f7a838245d3999bb84af51fccf1.tar.gz
tor-9965bd8387cf2f7a838245d3999bb84af51fccf1.zip
make my assumption explicit
svn:r1730
-rw-r--r--src/or/circuit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c
index a1ca45eee2..24ab5c59fb 100644
--- a/src/or/circuit.c
+++ b/src/or/circuit.c
@@ -1235,6 +1235,9 @@ void circuit_expire_old_circuits(void) {
!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 &&