From: Nick Mathewson Date: Wed, 19 May 2004 23:51:39 +0000 (+0000) Subject: Tighten assert_cpath_layer_ok assumptions X-Git-Tag: tor-0.0.7rc1~41 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=80be19d9da9e02deac29c7fb685559446d881b0b;p=thirdparty%2Ftor.git Tighten assert_cpath_layer_ok assumptions svn:r1904 --- diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 4f611b2196..9cdfb809be 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -395,14 +395,15 @@ int _circuit_mark_for_close(circuit_t *circ) { */ void assert_cpath_layer_ok(const crypt_path_t *cp) { - tor_assert(cp->f_crypto); - tor_assert(cp->b_crypto); // tor_assert(cp->addr); /* these are zero for rendezvous extra-hops */ // tor_assert(cp->port); switch(cp->state) { - case CPATH_STATE_CLOSED: case CPATH_STATE_OPEN: + tor_assert(cp->f_crypto); + tor_assert(cp->b_crypto); + /* fall through */ + case CPATH_STATE_CLOSED: tor_assert(!cp->handshake_state); break; case CPATH_STATE_AWAITING_KEYS: