[or-cvs] oh, and make it compile

Roger Dingledine arma at seul.org
Sun Jan 11 07:41:03 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	connection_or.c routerlist.c test.c 
Log Message:
oh, and make it compile
still need to make a decision about per-connection rate limiting
(take it out? update it?)


Index: connection_or.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_or.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- connection_or.c	23 Dec 2003 07:45:31 -0000	1.82
+++ connection_or.c	11 Jan 2004 07:41:01 -0000	1.83
@@ -76,7 +76,7 @@
 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);

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routerlist.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- routerlist.c	10 Jan 2004 23:40:38 -0000	1.14
+++ routerlist.c	11 Jan 2004 07:41:01 -0000	1.15
@@ -752,9 +752,9 @@
   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();

Index: test.c
===================================================================
RCS file: /home/or/cvsroot/src/or/test.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- test.c	17 Dec 2003 21:09:31 -0000	1.58
+++ test.c	11 Jan 2004 07:41:01 -0000	1.59
@@ -554,7 +554,7 @@
   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 @@
   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_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);



More information about the tor-commits mailing list