More accurate calculation of bandwith limits in past.
Buckets decrements with raw bytes for OR connection which more than real bytes. So global write bucket can and do run dry with negative numbers, if Tor transmit cells.
Fix can repair possibly issue with DoS against relay with DirPort reported by Scott Bennett on or-talk some time ago (december '07 and later).
--- connection.original.c Mon Sep 8 13:10:16 2008 +++ connection.c Thu Sep 25 20:44:40 2008 @@ -1718,7 +1718,7 @@ tor_assert(seconds_elapsed >= 0);
- global_relayed_write_bucket == 0 || global_write_bucket == 0;
- global_relayed_write_bucket <= 0 || global_write_bucket <= 0;
/* refill the global buckets */ connection_bucket_refill_helper(&global_read_bucket,
[Automatically added by flyspray2trac: Operating System: All]