diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-20 00:37:00 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-20 00:37:00 +0000 |
commit | 8acaf8e1872f711898e850687ccf55a196dc1312 (patch) | |
tree | 71991ac1c30547461a6c17fbbbbe4ef5ee6a809e /src/or/connection.c | |
parent | aa9461f13a9a0489da7bdb169d07ac18265ca817 (diff) | |
download | tor-8acaf8e1872f711898e850687ccf55a196dc1312.tar tor-8acaf8e1872f711898e850687ccf55a196dc1312.tar.gz |
Add "MEMUNIT" and "INTERVAL" types to configuration. Also tweak Accounting setup. More docs needed
svn:r2911
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index ceadfb6ed..e2f06cea4 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -718,12 +718,12 @@ static void connection_consider_empty_buckets(connection_t *conn) { } } -/** Initiatialize the global read bucket to options->BandwidthBurstBytes, +/** Initiatialize the global read bucket to options->BandwidthBurst, * and current_time to the current time. */ void connection_bucket_init(void) { or_options_t *options = get_options(); - global_read_bucket = options->BandwidthBurstBytes; /* start it at max traffic */ - global_write_bucket = options->BandwidthBurstBytes; /* start it at max traffic */ + global_read_bucket = options->BandwidthBurst; /* start it at max traffic */ + global_write_bucket = options->BandwidthBurst; /* start it at max traffic */ } /** A second has rolled over; increment buckets appropriately. */ @@ -734,12 +734,12 @@ void connection_bucket_refill(struct timeval *now) { or_options_t *options = get_options(); /* refill the global buckets */ - if(global_read_bucket < options->BandwidthBurstBytes) { - global_read_bucket += options->BandwidthRateBytes; + if(global_read_bucket < options->BandwidthBurst) { + global_read_bucket += options->BandwidthRate; log_fn(LOG_DEBUG,"global_read_bucket now %d.", global_read_bucket); } - if(global_write_bucket < options->BandwidthBurstBytes) { - global_write_bucket += options->BandwidthRateBytes; + if(global_write_bucket < options->BandwidthBurst) { + global_write_bucket += options->BandwidthRate; log_fn(LOG_DEBUG,"global_write_bucket now %d.", global_write_bucket); } |