mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Rename connection_bucket_refill to connection_bucket_refill_all
Also document its actual behavior
This commit is contained in:
parent
993f5d284d
commit
1356d51af6
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user