[or-cvs] remove last vestiges of op_port
Roger Dingledine
arma at seul.org
Wed Aug 27 22:42:13 UTC 2003
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
main.c or.h routers.c test.c
Log Message:
remove last vestiges of op_port
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- main.c 23 Aug 2003 10:09:25 -0000 1.85
+++ main.c 27 Aug 2003 22:42:10 -0000 1.86
@@ -661,10 +661,9 @@
signing_pkey_tag = "signing-key\n";
}
- result = snprintf(s, maxlen, "router %s %d %d %d %d %d\n%s%s%s",
+ result = snprintf(s, maxlen, "router %s %d %d %d %d\n%s%s%s",
router->address,
router->or_port,
- router->op_port,
router->ap_port,
router->dir_port,
router->bandwidth,
Index: or.h
===================================================================
RCS file: /home/or/cvsroot/src/or/or.h,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -r1.109 -r1.110
--- or.h 23 Aug 2003 10:09:25 -0000 1.109
+++ or.h 27 Aug 2003 22:42:10 -0000 1.110
@@ -362,7 +362,6 @@
uint32_t addr; /* all host order */
uint16_t or_port;
- uint16_t op_port;
uint16_t ap_port;
uint16_t dir_port;
Index: routers.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routers.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- routers.c 23 Aug 2003 10:09:25 -0000 1.41
+++ routers.c 27 Aug 2003 22:42:10 -0000 1.42
@@ -742,7 +742,7 @@
thank me for this someday. */
router->pkey = router->signing_pkey = NULL;
- if (tok->val.cmd.n_args != 6) {
+ if (tok->val.cmd.n_args != 5) {
log(LOG_ERR,"router_get_entry_from_string(): Wrong # of arguments to \"router\"");
goto err;
}
@@ -759,23 +759,20 @@
goto err;
}
- /* Router->op_port */
- router->op_port = atoi(ARGS[2]);
-
/* Router->ap_port */
- router->ap_port = atoi(ARGS[3]);
+ router->ap_port = atoi(ARGS[2]);
/* Router->dir_port */
- router->dir_port = atoi(ARGS[4]);
+ router->dir_port = atoi(ARGS[3]);
/* Router->bandwidth */
- router->bandwidth = atoi(ARGS[5]);
+ router->bandwidth = atoi(ARGS[4]);
if (!router->bandwidth) {
log(LOG_ERR,"router_get_entry_from_string(): bandwidth unreadable or 0. Failing.");
}
- log(LOG_DEBUG,"or_port %d, op_port %d, ap_port %d, dir_port %d, bandwidth %d.",
- router->or_port, router->op_port, router->ap_port, router->dir_port, router->bandwidth);
+ log(LOG_DEBUG,"or_port %d, ap_port %d, dir_port %d, bandwidth %d.",
+ router->or_port, router->ap_port, router->dir_port, router->bandwidth);
NEXT_TOKEN();
if (tok->tp != _PUBLIC_KEY) {
Index: test.c
===================================================================
RCS file: /home/or/cvsroot/src/or/test.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- test.c 23 Aug 2003 10:09:25 -0000 1.34
+++ test.c 27 Aug 2003 22:42:10 -0000 1.35
@@ -509,7 +509,6 @@
r1.address = "testaddr1.foo.bar";
r1.addr = 0xc0a80001u; /* 192.168.0.1 */
r1.or_port = 9000;
- r1.op_port = 9001;
r1.ap_port = 9002;
r1.dir_port = 9003;
r1.pkey = pk1;
@@ -529,7 +528,6 @@
r2.address = "tor.tor.tor";
r2.addr = 0x0a030201u; /* 10.3.2.1 */
r2.or_port = 9005;
- r2.op_port = 0;
r2.ap_port = 0;
r2.dir_port = 0;
r2.pkey = pk2;
@@ -554,7 +552,6 @@
test_assert(rp1);
test_streq(rp1->address, r1.address);
test_eq(rp1->or_port, r1.or_port);
- test_eq(rp1->op_port, r1.op_port);
test_eq(rp1->ap_port, r1.ap_port);
test_eq(rp1->dir_port, r1.dir_port);
test_eq(rp1->bandwidth, r1.bandwidth);
@@ -575,7 +572,6 @@
test_assert(rp2);
test_streq(rp2->address, r2.address);
test_eq(rp2->or_port, r2.or_port);
- test_eq(rp2->op_port, r2.op_port);
test_eq(rp2->ap_port, r2.ap_port);
test_eq(rp2->dir_port, r2.dir_port);
test_eq(rp2->bandwidth, r2.bandwidth);
More information about the tor-commits
mailing list