Rename connection_bucket_refill to connection_bucket_refill_all

Also document its actual behavior
This commit is contained in:
Nick Mathewson 2018-04-17 11:46:23 -04:00
parent 993f5d284d
commit 1356d51af6
3 changed files with 7 additions and 6 deletions

View File

@ -3178,9 +3178,10 @@ connection_bucket_adjust(const or_options_t *options)
}
}
/** Time has passed; increment buckets appropriately. */
/** Time has passed; increment buckets appropriately and re-enable formerly
* blocked connections. */
void
connection_bucket_refill(time_t now, uint32_t now_ts)
connection_bucket_refill_all(time_t now, uint32_t now_ts)
{
smartlist_t *conns = get_connection_array();

View File

@ -123,7 +123,7 @@ ssize_t connection_bucket_write_limit(connection_t *conn, time_t now);
int global_write_bucket_low(connection_t *conn, size_t attempt, int priority);
void connection_bucket_init(void);
void connection_bucket_adjust(const or_options_t *options);
void connection_bucket_refill(time_t now,
void connection_bucket_refill_all(time_t now,
uint32_t now_ts);
void connection_read_bw_exhausted(connection_t *conn, bool is_global_bw);
void connection_write_bw_exhausted(connection_t *conn, bool is_global_bw);

View File

@ -2407,7 +2407,7 @@ refill_callback(periodic_timer_t *timer, void *arg)
accounting_add_bytes(bytes_read, bytes_written, seconds_rolled_over);
if (milliseconds_elapsed > 0) {
connection_bucket_refill((time_t)now.tv_sec,
connection_bucket_refill_all((time_t)now.tv_sec,
monotime_coarse_get_stamp());
}