[or-cvs] Tighten assert_cpath_layer_ok assumptions
Nick Mathewson
nickm at seul.org
Wed May 19 23:51:42 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv15497/src/or
Modified Files:
circuitlist.c
Log Message:
Tighten assert_cpath_layer_ok assumptions
Index: circuitlist.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuitlist.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- circuitlist.c 18 May 2004 15:35:21 -0000 1.3
+++ circuitlist.c 19 May 2004 23:51:39 -0000 1.4
@@ -395,14 +395,15 @@
*/
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:
More information about the tor-commits
mailing list