aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/circuitpadding.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2019-05-15 03:33:53 +0000
committerGeorge Kadianakis <desnacked@riseup.net>2019-05-15 15:10:48 +0300
commit148c2d5bab051eb60e802fc6569c84a875c5f663 (patch)
treec3a44ba0c2003d79525103ecc73d568ad04d3982 /src/core/or/circuitpadding.c
parente8a1f241783878a242ebb153119af06631fe7cdb (diff)
downloadtor-148c2d5bab051eb60e802fc6569c84a875c5f663.tar.gz
tor-148c2d5bab051eb60e802fc6569c84a875c5f663.zip
Fix two typo bugs found by new state length test.
Diffstat (limited to 'src/core/or/circuitpadding.c')
-rw-r--r--src/core/or/circuitpadding.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/or/circuitpadding.c b/src/core/or/circuitpadding.c
index 7674f3510c..3124e74033 100644
--- a/src/core/or/circuitpadding.c
+++ b/src/core/or/circuitpadding.c
@@ -253,7 +253,7 @@ circpad_histogram_bin_to_usec(const circpad_machine_runtime_t *mi,
/* The infinity bin has an upper bound of infinity, so make sure we return
* that if they ask for it. */
- if (bin > CIRCPAD_INFINITY_BIN(mi)) {
+ if (bin > CIRCPAD_INFINITY_BIN(state)) {
return CIRCPAD_DELAY_INFINITE;
}
@@ -936,7 +936,7 @@ circpad_machine_update_state_length_for_nonpadding(
{
const circpad_state_t *state = NULL;
- if (mi->state_length != CIRCPAD_STATE_LENGTH_INFINITE)
+ if (mi->state_length == CIRCPAD_STATE_LENGTH_INFINITE)
return;
state = circpad_machine_current_state(mi);