mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
remove last vestiges of op_port
svn:r418
This commit is contained in:
parent
4c7e936a3a
commit
ce289f65f2
@ -661,10 +661,9 @@ int dump_router_to_string(char *s, int maxlen, routerinfo_t *router) {
|
||||
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,
|
||||
|
@ -362,7 +362,6 @@ typedef struct {
|
||||
|
||||
uint32_t addr; /* all host order */
|
||||
uint16_t or_port;
|
||||
uint16_t op_port;
|
||||
uint16_t ap_port;
|
||||
uint16_t dir_port;
|
||||
|
||||
|
@ -742,7 +742,7 @@ static routerinfo_t *router_get_entry_from_string_tok(char**s, directory_token_t
|
||||
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 @@ static routerinfo_t *router_get_entry_from_string_tok(char**s, directory_token_t
|
||||
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) {
|
||||
|
@ -509,7 +509,6 @@ test_dir_format()
|
||||
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 @@ test_dir_format()
|
||||
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_dir_format()
|
||||
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_dir_format()
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user