aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index daf51a0c5f..7035b8dc0a 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -723,8 +723,8 @@ static void connection_consider_empty_buckets(connection_t *conn) {
* and current_time to the current time. */
void connection_bucket_init(void) {
or_options_t *options = get_options();
- global_read_bucket = options->BandwidthBurst; /* start it at max traffic */
- global_write_bucket = options->BandwidthBurst; /* start it at max traffic */
+ global_read_bucket = (int)options->BandwidthBurst; /* start it at max traffic */
+ global_write_bucket = (int)options->BandwidthBurst; /* start it at max traffic */
}
/** A second has rolled over; increment buckets appropriately. */
@@ -736,11 +736,11 @@ void connection_bucket_refill(struct timeval *now) {
/* refill the global buckets */
if(global_read_bucket < options->BandwidthBurst) {
- global_read_bucket += options->BandwidthRate;
+ global_read_bucket += (int)options->BandwidthRate;
log_fn(LOG_DEBUG,"global_read_bucket now %d.", global_read_bucket);
}
if(global_write_bucket < options->BandwidthBurst) {
- global_write_bucket += options->BandwidthRate;
+ global_write_bucket += (int)options->BandwidthRate;
log_fn(LOG_DEBUG,"global_write_bucket now %d.", global_write_bucket);
}