more progress and cleanups

svn:r9269
This commit is contained in:
Roger Dingledine
2007-01-05 06:03:10 +00:00
parent 466650aa14
commit 658c09c06f
6 changed files with 50 additions and 20 deletions
+2
View File
@@ -875,6 +875,8 @@ tor_tls_get_n_raw_bytes(tor_tls_t *tls, size_t *n_read, size_t *n_written)
* we wrapped around by more than ULONG_MAX since the last time we called
* this function.
*/
tor_assert(r >= tls->last_read_count);
tor_assert(w >= tls->last_write_count);
*n_read = (size_t)(r - tls->last_read_count);
*n_written = (size_t)(w - tls->last_write_count);
tls->last_read_count = r;