mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 13:43:47 +01:00
Fix issues in 3630 patch noted by Karsten
This commit is contained in:
parent
a8297a301e
commit
fee094afcd
@ -2388,10 +2388,10 @@ connection_bucket_init(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Refill a single <b>bucket</b> called <b>name</b> with bandwidth rate
|
/** Refill a single <b>bucket</b> called <b>name</b> with bandwidth rate per
|
||||||
* per second <b>rate</b> and bandwidth burst per refill interval
|
* second <b>rate</b> and bandwidth burst <b>burst</b>, assuming that
|
||||||
* <b>burst</b>, assuming that <b>milliseconds_elapsed</b> milliseconds
|
* <b>milliseconds_elapsed</b> milliseconds have passed since the last
|
||||||
* have passed since the last call. */
|
* call. */
|
||||||
static void
|
static void
|
||||||
connection_bucket_refill_helper(int *bucket, int rate, int burst,
|
connection_bucket_refill_helper(int *bucket, int rate, int burst,
|
||||||
int milliseconds_elapsed,
|
int milliseconds_elapsed,
|
||||||
@ -2449,7 +2449,7 @@ connection_bucket_refill(int milliseconds_elapsed, time_t now)
|
|||||||
connection_bucket_refill_helper(&global_write_bucket,
|
connection_bucket_refill_helper(&global_write_bucket,
|
||||||
bandwidthrate, bandwidthburst,
|
bandwidthrate, bandwidthburst,
|
||||||
milliseconds_elapsed,
|
milliseconds_elapsed,
|
||||||
"global_read_bucket");
|
"global_write_bucket");
|
||||||
connection_bucket_refill_helper(&global_relayed_read_bucket,
|
connection_bucket_refill_helper(&global_relayed_read_bucket,
|
||||||
relayrate, relayburst,
|
relayrate, relayburst,
|
||||||
milliseconds_elapsed,
|
milliseconds_elapsed,
|
||||||
|
@ -3107,8 +3107,7 @@ typedef struct {
|
|||||||
* log whether it was DNS-leaking or not? */
|
* log whether it was DNS-leaking or not? */
|
||||||
int HardwareAccel; /**< Boolean: Should we enable OpenSSL hardware
|
int HardwareAccel; /**< Boolean: Should we enable OpenSSL hardware
|
||||||
* acceleration where available? */
|
* acceleration where available? */
|
||||||
/** Token Bucket Refill resolution in milliseconds (ignored when
|
/** Token Bucket Refill resolution in milliseconds. */
|
||||||
* bufferevents are enabled) */
|
|
||||||
int TokenBucketRefillInterval;
|
int TokenBucketRefillInterval;
|
||||||
char *AccelName; /**< Optional hardware acceleration engine name. */
|
char *AccelName; /**< Optional hardware acceleration engine name. */
|
||||||
char *AccelDir; /**< Optional hardware acceleration engine search dir. */
|
char *AccelDir; /**< Optional hardware acceleration engine search dir. */
|
||||||
|
Loading…
Reference in New Issue
Block a user