]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Tighten assert_cpath_layer_ok assumptions
authorNick Mathewson <nickm@torproject.org>
Wed, 19 May 2004 23:51:39 +0000 (23:51 +0000)
committerNick Mathewson <nickm@torproject.org>
Wed, 19 May 2004 23:51:39 +0000 (23:51 +0000)
svn:r1904

src/or/circuitlist.c

index 4f611b219671ed8d2367ffc7223ee5db0a7b38a7..9cdfb809be06aef09726f5c91482562edcc9cda4 100644 (file)
@@ -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: