]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix some circuitmux-related asserts in relay.c
authorAndrea Shepard <andrea@torproject.org>
Mon, 1 Oct 2012 21:24:08 +0000 (14:24 -0700)
committerAndrea Shepard <andrea@torproject.org>
Wed, 10 Oct 2012 07:44:46 +0000 (00:44 -0700)
src/or/relay.c

index d0341625f71c5616d29a24e4b240d4ea58ca43a5..7c81273a0a7e0a8817b114774f27edb4438dddb7 100644 (file)
@@ -1779,7 +1779,7 @@ circuit_consider_sending_sendme(circuit_t *circ, crypt_path_t *layer_hint)
 
 #ifdef ACTIVE_CIRCUITS_PARANOIA
 #define assert_cmux_ok_paranoid(chan) \
-     assert_cmux_okay(chan)
+     assert_circuit_mux_okay(chan)
 #else
 #define assert_cmux_ok_paranoid(chan)
 #endif
@@ -2117,6 +2117,9 @@ channel_flush_from_first_active_circuit(channel_t *chan, int max)
       streams_blocked = circ->streams_blocked_on_p_chan;
     }
 
+    /* Circuitmux told us this was active, so it should have cells */
+    tor_assert(queue->n > 0);
+
     /*
      * Get just one cell here; once we've sent it, that can change the circuit
      * selection, so we have to loop around for another even if this circuit