]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Adjust the circuitmux_t counter correctly in circuitmux_notify_xmit_cells()
authorAndrea Shepard <andrea@torproject.org>
Mon, 1 Oct 2012 17:58:27 +0000 (10:58 -0700)
committerAndrea Shepard <andrea@torproject.org>
Wed, 10 Oct 2012 07:44:46 +0000 (00:44 -0700)
src/or/circuitmux.c

index b16eb63acc34406293ca1a4fa02902889e8f4b8b..fd598407eb4d7547af1959941f5db8e4064b83af 100644 (file)
@@ -1324,6 +1324,8 @@ circuitmux_notify_xmit_cells(circuitmux_t *cmux, circuit_t *circ,
   hashent->muxinfo.cell_count -= n_cells;
   /* Do we need to make the circuit inactive? */
   if (hashent->muxinfo.cell_count == 0) becomes_inactive = 1;
+  /* Adjust the mux cell counter */
+  cmux->n_cells -= n_cells;
 
   /* If we aren't making it inactive later, move it to the tail of the list */
   if (!becomes_inactive) {