[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r12993: And clean up an assertion failure. (in tor/trunk: . src/or)
Author: nickm
Date: 2007-12-26 22:27:48 -0500 (Wed, 26 Dec 2007)
New Revision: 12993
Modified:
tor/trunk/
tor/trunk/src/or/buffers.c
Log:
r17405@catbus: nickm | 2007-12-26 22:27:37 -0500
And clean up an assertion failure.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r17405] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/or/buffers.c
===================================================================
--- tor/trunk/src/or/buffers.c 2007-12-27 03:23:57 UTC (rev 12992)
+++ tor/trunk/src/or/buffers.c 2007-12-27 03:27:48 UTC (rev 12993)
@@ -229,6 +229,7 @@
int n_to_free = free_all ? freelists[i].cur_length :
(freelists[i].lowest_length - slack);
int n_to_skip = freelists[i].cur_length - n_to_free;
+ int new_length = n_to_skip;
chunk_t **chp = &freelists[i].head;
chunk_t *chunk;
log_info(LD_MM, "Cleaning freelist for %d-byte chunks: keeping %d, "
@@ -248,7 +249,7 @@
--n_to_free;
}
tor_assert(!n_to_free);
- freelists[i].cur_length = n_to_skip;
+ freelists[i].cur_length = new_length;
}
freelists[i].lowest_length = freelists[i].cur_length;
assert_freelist_ok(&freelists[i]);