diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/connection_or.c | 2 | ||||
-rw-r--r-- | src/or/routerlist.c | 4 | ||||
-rw-r--r-- | src/or/test.c | 7 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 712403680..07283d8e5 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -76,7 +76,7 @@ int connection_or_finished_flushing(connection_t *conn) { void connection_or_init_conn_from_router(connection_t *conn, routerinfo_t *router) { conn->addr = router->addr; conn->port = router->or_port; - conn->receiver_bucket = conn->bandwidth = router->bandwidth; + conn->receiver_bucket = conn->bandwidth = router->bandwidthburst; conn->onion_pkey = crypto_pk_dup_key(router->onion_pkey); conn->link_pkey = crypto_pk_dup_key(router->link_pkey); conn->identity_pkey = crypto_pk_dup_key(router->identity_pkey); diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 81de16c40..f4eeb29e0 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -752,9 +752,9 @@ routerinfo_t *router_get_entry_from_string(const char**s) { router->bandwidthburst = 10*router->bandwidthrate; #endif - log_fn(LOG_DEBUG,"or_port %d, socks_port %d, dir_port %d, bandwidth %u.", + log_fn(LOG_DEBUG,"or_port %d, socks_port %d, dir_port %d, bandwidthrate %u, bandwidthburst %u.", router->or_port, router->socks_port, router->dir_port, - (unsigned) router->bandwidth); + (unsigned) router->bandwidthrate, (unsigned) router->bandwidthburst); /* XXX Later, require platform before published. */ NEXT_TOKEN(); diff --git a/src/or/test.c b/src/or/test.c index 34fe2d692..5f493d9e7 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -554,7 +554,7 @@ test_dir_format() r1.onion_pkey = pk1; r1.identity_pkey = pk2; r1.link_pkey = pk3; - r1.bandwidth = 1000; + r1.bandwidthrate = r1.bandwidthburst = 1000; r1.exit_policy = NULL; r1.nickname = "Magri"; @@ -578,7 +578,7 @@ test_dir_format() r2.onion_pkey = pk2; r2.identity_pkey = pk1; r2.link_pkey = pk2; - r2.bandwidth = 3000; + r2.bandwidthrate = r2.bandwidthburst = 3000; r2.exit_policy = &ex1; test_assert(!crypto_pk_write_public_key_to_string(pk1, &pk1_str, @@ -615,7 +615,8 @@ test_dir_format() test_eq(rp1->or_port, r1.or_port); test_eq(rp1->socks_port, r1.socks_port); test_eq(rp1->dir_port, r1.dir_port); - test_eq(rp1->bandwidth, r1.bandwidth); + test_eq(rp1->bandwidthrate, r1.bandwidthrate); +// test_eq(rp1->bandwidthburst, r1.bandwidthburst); test_assert(crypto_pk_cmp_keys(rp1->onion_pkey, pk1) == 0); test_assert(crypto_pk_cmp_keys(rp1->link_pkey, pk3) == 0); test_assert(crypto_pk_cmp_keys(rp1->identity_pkey, pk2) == 0); |