diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2019-05-11 02:51:14 +0000 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2019-05-15 04:57:11 +0000 |
commit | 010779176bb959c8106a95806ede2c80b4397f60 (patch) | |
tree | 0caeda77c5bda7a31088794e48a39c307642e779 /src/core/or/circuitpadding.h | |
parent | 43d41194546dbf6a634648d592e97ccd10b04fda (diff) | |
download | tor-010779176bb959c8106a95806ede2c80b4397f60.tar.gz tor-010779176bb959c8106a95806ede2c80b4397f60.zip |
Bug 29085: Refactor non-padding accounting out of token removal.
This commit moves the padding state limit checks and the padding rate limit
checks out of the token removal codepath, and causes all three functions to
get called from a single circpad_machine_count_nonpadding_sent() function.
It does not change functionality.
Diffstat (limited to 'src/core/or/circuitpadding.h')
-rw-r--r-- | src/core/or/circuitpadding.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/or/circuitpadding.h b/src/core/or/circuitpadding.h index f00369eb0a..7d0f8dacfa 100644 --- a/src/core/or/circuitpadding.h +++ b/src/core/or/circuitpadding.h @@ -712,9 +712,6 @@ circpad_machine_sample_delay(circpad_machine_runtime_t *mi); STATIC bool circpad_machine_reached_padding_limit(circpad_machine_runtime_t *mi); -STATIC -circpad_decision_t circpad_machine_remove_token(circpad_machine_runtime_t *mi); - STATIC circpad_delay_t circpad_histogram_bin_to_usec(const circpad_machine_runtime_t *mi, circpad_hist_index_t bin); @@ -722,6 +719,8 @@ circpad_histogram_bin_to_usec(const circpad_machine_runtime_t *mi, STATIC const circpad_state_t * circpad_machine_current_state(const circpad_machine_runtime_t *mi); +STATIC void circpad_machine_remove_token(circpad_machine_runtime_t *mi); + STATIC circpad_hist_index_t circpad_histogram_usec_to_bin( const circpad_machine_runtime_t *mi, circpad_delay_t us); |